I've gone through various stages in my life regarding male social nudity. Under age 10 in the 1950s I didn't even think about it, swam naked in our family's home pool and those of my school friends, during boys' swim at the YMCA (mandatory), skinny-dipped at boys summer camp and in our local river.
Then puberty came and I got very shy. Gym gang showers in high school (grades 9-12) were very difficult. Problem was I'd get a stiffie just thinking about my naked male companions, and that meant you were a queer back then, not good.
The Army was a challenge, too. But I learned to go into almost a trance in the gang showers, and see nothing around me, think of nothing. I'd also think of playing tranquil Mozart piano pieces to distract my mind and relax myself.
Over time things got easier. But what finally solved it totally was going to gay bathhouses, believe it or not. Not that I'm recommending that for you.
But it seems being able to be totally uninhibited with other guys in the shower and locker room, getting as openly stiff as I liked, touching and even having sex, made straight showers anti-climatic. (Not sure if that's a kind of pun) I got such a fill of eye candy and more in bathhouses that straight showers and locker rooms meant nothing to me. Perhaps a kind of overload therapy, I dunno.
But I think what you're experiencing is not abnormal for a gay man. You just need to condition yourself to be comfortable, by the means that work best for you. And not let this interfere with your beneficial gym experience.