You aren't going to want to hear this, but management jobs require the ability to play office politics. It is about 80-90% of what they do. Your co-worker has shown this ability and you have not.
It is not enough to do a job well, you have to make sure you are perceived by senior managers as having done well and you have to show the skills needed for the job you are aiming for not just for your job. You have to build a reputation within the organization not just within your own work group. You have to tell people you are interested in a promotion and ask to be given assignments to help you get that promotion. You have to take credit for your work before someone else takes credit for it. You also have to walk the fine line between being good at your job and being so good that they can't afford to promote you out of it.
There are lots of books on office politics. You don't have to be a ruthless snake to play. In fact you in the game whether you want to be or not which is why you are losing. Right now you are like a football team that is standing around on the playing field chatting while the other team moves the ball. That is a sure way to lose.
If your colleague gets the job (which I give a 95% chance to or better from what you said, these internal promotions are almost always decided long before the official job opening is posted) then you need to learn to work for this person and to not have an attitude about losing the promotion. You need to learn how to play the game effectively in your office, which he clearly can show you. You need to support you new boss and make him look good so he gets promoted and leaves the slot to you or you need to find a new job.
While you company culture may make it harder for a woman to get promoted, don't fall into the trap of thinking this is the reason. You can't fix that (well I guess technically you could change sexes, but I am thinking that the surgery is probably not what you want to do), so don't dwell on it. Look at what you can fix. Some of why women have trouble getting promoted is that they are socialized not to push themselves forward. You can learn to promote yourself within and outside the organization, so that you have a better chance of getting promoted. Political skills are necessary for all but the most junior of jobs. So get those skills. Learn how to be effective as a leader. Learn how to directly ask for what you want and get a plan set up for getting there. Those are things you can change, so concentrate on them. I am a woman, I can't tell you the number of times I was told that a woman couldn't do this or that job when I was young. So I know it is painful to feel as if something you can't help is holding you back. But I have noticed through the years, the people who keep that in their mind as the main reason for their problems rarely get promoted and or if they do they are discounted by everyone because they were an Affirmative action pick and clearly, in the minds of others, not qualified. So that is not the effective way to go.
I understand that it is frustrating to feel as if someone less qualified is going to be promoted over you as I have certainly been in that position. But you know the funny thing is the one that upset me the most about his promotion, turned out to be the best boss I ever had. Good thing I didn't burn my bridges with him beforehand or when he was first promoted or I would not be where I am today. And even a bad boss can be a blessing if you can get him to give you the tasks he doesn't want to do. Then you get the experience that shows you are ready to move up. And what will hurt you for promotion the next time is to be angry and uncooperative with the person they do promote.