@OtterlyAstounding I'm not offended, but I think you're being obtuse/overly simplistic/naive.
Well, no, it's implying that all straight teenage boys are liable to get girls pregnant...so making a joke about an entire sex.
It's making a joke about teenage boys and their sex class yes, but demonstrably not in the same way as implying that men are awful. And there's a clear comparator - you can joke that a teenage lesbian is "at least not going to get pregnant". Historically teen pregnancy was always predominantly been seen as the girl's problem, not the boy's. (Because, sexism.)
And it's in the same vein - a flippant joke about a humorous stereotype, which may or may not apply. But it's NOT just based on a humorous stereotype, that's the point. There is more than a grain of truth and seriousness in it, and it's not always said as a joke. Men commit more than 95% of all violent crimes. And have been patriarchal and sexist. There's a reason why the concept of political lesbianism was created by some radical feminists.
There's another thread running at the moment where a woman is saying now she's in her 40s she's realised she doesn't really like men (as people, platonically). People are agreeing with her. The sentiment is the same as that in the OP's joke, albeit totally serious.
And I know how I reacted when my lesbian family member came out - I really can't imagine I'd be any different with a gay male family member!
You really can't? Then you are perhaps naive to, or uneducated regarding, some key differences. To be clear, I'm not talking about your public reaction but your private or internal one. And what type of relation you are makes a difference too. I think all family members should be outwardly accepting and supportive - that's just a base level of love and decency IMO- but that doesn't mean that there aren't necessarily some legitimate concerns that may give parents some pause for thought.