Late to the party, but let's address some issues so this doesn't happen again.
1. Piranhas need a MUCH more varied diet than just fish. "offer a balanced diet of frozen fish, shellfish, fruit, nuts, seeds, floating pellets, plus the occasional earthworm"
2. You should also be aware of Thiaminase. Thiaminase is an enzyme that destroys Thiamine a.k.a. Vitamin B1. The lack of Thiamine causes severe health problems in all animals, including fish. Some fish species contain Thiaminase, so if you feed these to your fish in excessive amounts, they'll have health problems too. Goldfish, and in fact, all members of the Cyprinidae family contain Thiaminase.
3. "Feeder" fish at stores are severely neglected. As you've experienced, they are an excellent way to introduce various diseases to your healthy fish tank. Unless you quarantine them for several weeks they are a health risk. And unless you make sure they are in good health and gut loaded, they are not nutritious at all.
4. It's quite possible to wean them off live foods, piranhas do a lot of scavenging, foraging in the nature to begin with.
5. If you decide to feed them live fish anyway, PLEASE be responsible and breed your own, healthy stock for them.
Much more info and a longer list of species containing Thiaminase here: https://www.monsterfishkeepers.com/forums/threads/the-piranha-nutrition-thread.306686/