[MAKE SURE TO READ THIS LINK FIRST IF THIS IS YOUR FIRST TIME VISITING ENGLISH MANIF.]
Some friends I respect have reminded me that people do not necessarily have to spend money on a gym membership. If they want to, they can buy exercise equipment to use at home.
"Squat cage" seems to be the term you can use on Google. If you add up the cost of basic exercise equipment, it may seem like a hefty price tag, but you have to compare this to how much money you spend on a gym membership. (This tip comes from Ari Mendelson, author of Bias Incident. He is heterosexual but struggled with weight gain. He recommends this book.)
And some of you do not have strong enough will-power yet, to expose yourself to the dangerous temptations of the gym. You may want to avoid gyms entirely and work out at home.
My view is that gym membership is good for you, because you need to interact with people and do not want to get so lonely that you backslide or abandon your journey. While I know gyms are often places where gay men congregate, they are also places where a lot of straight men congregate, so if you are wise as serpents but gentle as doves, you can build community with other men through gym membership. This helps you to see male friendships in light other than sexual.
But this may be an individual thing, not a general rule. I have gotten some feedback from some guys that they are not able to resist temptation at gyms.
So I thought I would post this for you to think about. My caution is, if you do all your working out at home, you may have lots of slack time and this may leave you more prone to watch porn and masturbate.