If it's the latter, then I'm all for fixing that problem. But if it's the former, then it may just be the case that women don't' want to be in tech. I try encouraging my sister to learn about programming and computers all the time, but she'll have nothing to do with it. It has a certain, ah, stereotype when you're good at that stuff that she'd rather avoid (although she's smarter than I am and could probably learn it very quickly).
This is one of those "fish don't have a word for water" problems to some degree, beyond the misogyny that so often exists in tech. Part of the problem is that there is this stereotype of the tech "nerd" who is socially awkward, doesn't shower, works 70+ hours a week. That serves as a roadblock for guys to get into tech as well, but it's far easier for guys to overcome it than women. The fact that women are much less likely to find that stereotype desirable is used as a reinforcement of the notion that "girls just aren't well suited to the tech lifestyle". But the "tech lifestyle" is not an absolute, it's just a semi-arbitrary tradition. And it forms the core of just as much of an "old boy's club" as, say, traditions of cigars, scotch, and golf do in other activities. Or, more so, traditions of strip clubs and casual acceptance of pornographic representations of women, which is also a thing in many corners of tech.
Self-reinforcing stereotypes are part of the problem. The way that women are treated as outsiders and 2nd class citizens is part of the problem. The fact that women who are interested in tech and talented are turned off by the stereotypes and the culture is part of the problem.