Following on from the very helpful advice above, a few questions/comments:
* Did you do a fishless cycle before getting the fish (ie a 6-8 week process of preparing the filter to build up sufficient beneficial bacteria be able to process ammonia, using an ammonia source to mimic fish waste
https://www.fishkeeping.co.uk/articles ... hless-cycling-article.htm)?
If not, and you simply set up the tank and added tap water with water dechlorinator and switched on the filter, then got that water tested before adding fish, its readings will be "all in order" - but that will change as soon as fish are added and waste/ammonia produced. If this fishless cycle wasn't undertaken, now that you've got fish, ordinarily I'd advise trying to prevent the immediate deaths of the others by following this fish-in cycle guide
https://www.fishkeeping.co.uk/articles ... ammonia-nitrite-spike.htm - *however*, given how unsuitable the tank size is for goldfish, I would follow Fishlady's advice and return/exchange them. It might be that they give you a credit note on their return and you can get fish at a later date, once you've done a fishless cycle.
* You mentioned "changing the filter" - if you mean you discarded the old filter cartridge and carbon, replacing it with new cartridge or other filter media and carbon, then this is going to result in prolonging/re-starting the cycle - you need to keep the same filter media and only squeeze/rinse it gently during the weekly water change in being-discarded tank water.
* The local fish place oughtn't to have sold you *any* goldfish for that size of tank and its limited 'footprint', so you are well within your rights to return those fish and get something more suitable for its size such as those suggested by Fishlady.
* You ought to buy a liquid-based testing kit (ammonia, nitrite, nitrates) - not a strip-based one - to monitor water quality in between water changes and ensure that water is kept consistently at safe levels.