In high school, about half my AP CS class was girls, I think.
Maybe it's not so much that "an entire gender" is disinterested but that there was a tidal wave of people who wanted to get into programming after 2000 who were mostly male and changed the culture? And a lot of people, who were good at other things besides computers, said yuck and did something else.
It's easy to assume that when a group dominates a field that they must be better on average at the required skills, but it could be more a result of their lack of other skills.