Goldfish don't get pregnant. They lay eggs and probably like most fish only lay eggs if there is a male around. If an egg laying fish looks pregnant it's usually a case of bloat/dropsy which is extremely common in goldfish. It can be caused by many things including poor water quality(ever tested nitrates on a goldfish tank?), diet, and a variety of bacterial, parasitic, and fungal infections. Goldfish are mostly herbivorous fish and should be provided some plant matter such as growing a bit of duckweed for them or tossing in cheap plants for them to chew up or feeding them things like veggie flakes. Feeding them only on meaty flakes made for tropical fish like tetras and freeze dried foods like brineshrimp and bloodworms can increase the chance of bloat.