I'm basically the opposite. I work in a male dominated field, many of my hobbies are male dominated, all of my coworkers are male, my close friends are all male, etc. It's not that I don't get along with the ladies, but I'm just never really in a position to socialize with them. It may be similar for you. Think about where/how you're spending your time and if there are or aren't opportunities to befriend guys.
For me: I spend at least 40 hours a week working with other guys. My roommates are two guys. My partner is FTM. Two of the things I spend the most time on are video games and cars, both of which are very male-dominated areas. Not a lot of room for female interaction.
There are plenty of guys out there who are respectful and treat people well. That may also be a part of the problem - don't make up your mind about people until you've really given them a chance. Some of the most abrasive people I've met turned out to be very decent after rough first impressions.