I'm far from an expert in fish health or disease I'm afraid (will be tagging some people with better brains and experience than I! Now that they have info to work with) but I don't think it's a food problem nor a swim bladder problem - when fish over-eat on dried foods or gulp air while eating flakes, they tend to get bloated, and otherwise look normal but struggle to swim away from the surface. Actual swim bladder disease isn't terribly common, is often misdiagnosed, and is very unlikely in your case, with an established tank, older fish and no recent additions.
If you've had this tank for five years and it was an adopted tank with adopted fish, I think it's far more likely that it's old age that is causing this. Internal systems starting to fail, so the fish is dying. glolight tetra aren't a particularly long lived species, five years is about the max. I could well be wrong though, hopefully
@Colin_T @Naughts or
@Slaphppy7 will have better info for you!
For the nitrates, you can do larger weekly water changes to help get that number down, many of us here do 50% water changes weekly, even up to 75%. Make sure you're not overfeeding (most of us in the hobby are guilty of that! and more food in means more waste out), add some fast growing plants like elodea or water sprite that help suck up ammonia and reduce nitrates that way, since plants like java moss and fern are slow growing and not so helpful for that, and you can also water change more frequently. When my fish have fry that are growing out, I up the water changes from 50% weekly to 2-3 times per week, since there's increased feeding and increased bioload as the fish get bigger. You can be guided by your test results about how often to water change. If 50% weekly is enough that nitrates don't go above 20ppm by the next water change, then stick with 50% weekly. If they go above 20ppm between changes, can either try a 75% change weekly, or 50% twice a week.
Just know that if you change 25% per week, you're leaving 75% of the bad stuff in there. That builds up over time, and can reach a tipping point. Ideally you want your tank water to be chemically close to your source water, so that you can do large water changes when needed, and reduce chances of old tank syndrome, or can cope with a crisis like a tank bursting or a kid pouring in an entire tub of fish food, when being able to do large water changes is essential. As long as you make sure to match the new water to the tank temperature before adding it, and use a water conditioner, then large water changes are fine.
Don't fret about trying to change the pH; trying to adjust pH does more harm than good, as swings in pH cause far more harm than a stable but "wrong" pH. The water hardness is a concern in the long term though, especially since you have a mixture of fish that aren't compatable in terms of their water hardness needs. Guppies prefer harder water, tetra soft, so even if you buy an RO filter (or buy RO water, or use rainwater) the water will then be unsuitable for the guppies. Sometimes it's better to let your current stock live out their lives in your current tank and water conditions, then in the future, choose fish that will be content in your specific water parameters. It's great that you're learning about these things and want to give them great conditions though!
@Essjay is our chemistry expert who is much better at explaining these things than I am, and could give much better advice if you decide you'd like to use RO or change any other aspects of your water chemistry.
If you'd like to keep both, you could do as I am, and have them in seperate tanks. My water is hard, so most of my tanks have hardwater fish like guppies. But one tank I wanted to keep otos and pygmy cories, so I use a mix of my tapwater and rainwater to make it softer and suited for those species.
We can also suggest other more quality foods if you'd like