People are going to jump on you about keeping goldfish in anything smaller than like a 30 gallon. Let me start by saying congrats on learning about ammonia as its the biggest fish killer out there. As far as tank size, I figure if you keep up with the water changes and keep the water high quality, you are doing more for these goldfish thank most people who buy them, especially if they were feeder fish, so dont beat yourself up.
When starting a new tank, you need to cycle it. If you put your golds in the new one right away, you will have to check the ammonia and nitrite levels daily as any ammonia will burn their gills and they will die. Nitrites are also toxic and will kill them. while cycling with fish in, you need daily water changes and to be testing every day. It takes a long time and is a pain in the rear, but ive done it safely.
Nitrates form after the tank has started to cycle and arent as harmful as long as they are kept at lower amounts (10-20ppm). You will want to buy a test kit. I suggest api master test kit, and stay away from testing strips as they arent very reliable. Nitrates and Nitrites are not the same, but both part of the cycling process.
Make sure you are using a dechlorinating liquid when adding water or doing water changes. You will also need to purchase a siphon to vaccum the gravel for fish waste, which gold fish produce a ton of. They are cute buggers but poop up a storm.
It may seem overwhelming, but its not once you get the hang of it. What size is the new tank? I would suggest reading up on cycling a new tank with fish present as it will give you all the details you need. Ask as many questions as you can, even if repetitive. Personally, since you already have the fish...........I would set up the new one how you want it and put the goldfish in it right away. I would try and add things from their old tank to help jump-start the bacteria you need to cycle. Then I would test daily, maybe even twice daily and do water changes if you see any ammonia present at all. It can take a while, but you can do it if you are committed and water changes honestly only take like 10 minutes with a siphon. Welcome to the fish keeping hobby!!!
Also, with goldfish you do not need a heater most of the time. If you plan on keeping anything else besides them, you may need to buy one.