Two kinds of people, people who keep to themselves and people who don't. You are the problem not the people in the Gym. You will go to a new gym and yes the first few weeks you will keep to yourself, you will brag how great and wonderful it is (it really is). Next you will talk to just one guy simply because well that one guy knows someone that you might know or some other sick pathetic excuse you social retards give yourself. Before you know it you will be back to the same BS you are now.
Like I said you are the problem, its a disease, it brings only hell and no good.
I urge you to see real help on this from a professional therapist, only they can try to unravel why you feel the need to go against what you know is wrong and disastrous.
Simple rule, the more social one is the more fucked up their life is, this rule has no exceptions. Even if they are billionaires (rare for a social person to ever become successful) if they are social they are dealing with drama 24/7.
I guarantee you that you are the same fool that anywhere you go to more than a few times you get to know everyone there. You know all the people who work in a restaurant you frequent, you know way to many of your neighbors etc.