And most straight servicemembers could care less about whether a gay person is actually checking them out in the shower. If they were really that concerned, they wouldn't be in the military now. Or, at least they shouldn't be, since we do have gays in the military now who very well could be looking at them in the shower or naked now. And, there are a whole lot more important things to be concerned with than who may be looking at them naked.
I bet you that most people's discomfort at being naked in front of others comes from being uncomfortable about someone else judging them for imperfections, not from their looks possibly turning someone on. It would obviously depend on the person, but why be uncomfortable about someone else being turned on by the way you look naked? So what? Does that hurt you in some way, that they're turned on by your naked body? Does a person with obvious imperfections, that could cause other people to be uncomfortable be forced to sleep/shower somewhere else, because they may make people uncomfortable? What about a not-very-attractive person sleeping naked? That makes a lot of people uncomfortable. I say put them in a different berthing, it makes the rest of those the person works with uncomfortable, so why not?
And all gay units won't work. There are not enough gays that would be openly gay in any one job to make a complete unit.