That's not the kind of joke made by people with secure masculinity so I think these few steps can help you:
Picture a woman more successful than you.
Accept that she is not a threat to your ego.
Understand that your self worth isn't defined by other people.
Repeat the phrase "Successful women don't exist ____(despite of/because of/for/to hate/to ruin/to mock) me." Successful women simply exist, whether you are there to observe them or not.
Remove "women are ____" statements from your speech until you no longer feel threatened by them.