Re: John's marriage.
Here's the thing. There's intense pressure for officers to marry early. It makes them more promotable because it makes them look steadier - wife and kids will do that. It also makes them look not-gay. And - a spouse is very important just to move the career ahead. In fact, single John would probably not have gone past major anyway without a wife to politic for him. (Really good information here. Doesn't seem to require a sign-in.) He probably only got promoted at all because Elizabeth refused to have another military commander, and that job would require a Lt. Colonel, and so...
Now we know John isn't overly ambitious, but he did want the good missions and whether he was just going with the flow or really was trying to either hide the gay from others (or himself - we don't know his upbringing, other than the Air Force brat thing, and that would be enough without religious issues.), it's not surprising he got married. And it's not surprising it didn't work. You know - they got married. He got posted someplace where she couldn't go with him. Then he got posted someplace where she could and found that he didn't do marriage well. And it was over.
I don't want to think about little Sheppards - and, honestly, I don't think he'd be on Atlantis if there were. Because I think that, gene or no gene, no one with dependents would be permitted to take the one way trip to another galaxy. Bunch of single professionals in their mid-thirties, plus bunch of marines and officers who, yeah, also single.
I'm going to guess that more than 10% of that population are gay. Maybe 20%, given youngish Marines, the fact that there would be other failed marriages, that there may be some married couples among the scientists and that, well, many scientists may lack the social skills necessary to get married/are married to their work/lack the social pressure to do so. Still, the odds are that there is a higher percentage than in the general population. And John? Is fully aware of this and DOESN'T CARE.