Of course the two are comparable. In both cases an author is inventing a person and situations and narrating their invention. Calling them incomparable is a transparent attempt to shoot down the argument without actually engaging with it.
The joke described a hypothetical person who was born and died on certain dates, and then fleshed that out with additional invented details: gender and use of diapers at both the beginning and end of his life. If you're going to complain about the author of the joke assigning their fictional character a gender you might as well also complain about them assigning him to use adult diapers, since many real actual people would also be deeply offended by such a mis-diapering. If you're going to complain about the author of a short humorous anecdote assigning their character a gender you might as well also complain about the author of a novel assigning their character a gender.
I'm happy to have a serious discussion here but I'm not going to bother if you continue to try to dismiss my arguments without engaging.