I think that the sex/gender distinction is useful in sociology. 'Sex' is a biological term, referring to one's genetics, reproductive genitalia and secondary sex characteristics. 'Gender' is a cultural term, referring to how the sexes are expected to behave and the expectations that the culture places on them. Of course it can get fuzzy, if we hypothesize that some of the male/female behavioral differences are innate.
The problem is that the otherwise defensible sex/gender distinction was taken up like a flag by feminists and thoroughly politicized. So the public started to perceive the distinction as an issue of political correctness. The biological term 'sex' started to be perceived as morally tainted (not unlike 'nigger') with possible social penalties for its use.
So today we often see the word 'gender' being employed in situations where it's obvious that biological 'sex' is being referred to.
Interesting. I have just consulted my 1979 Oxford English Dictionary (the full version), which has 4 meanings for the noun "gender" which I summarise below:-
1. kind, sort, class, genus
2. grammatical classes more or less corresponding to sex or absence of sex (i.e. masculine, feminine, neuter)
3. synonym for sex, said to be "now only jocular"
4. product, offspring, generation, said to obsolete and rare.
It is notable that
none of these corresponds to a cultural term.
I conclude that the current usage of "gender" as a cultural term is, as I suspected, a sort of neologism. For most of my life it was the sexes that were spoken of in cultural contexts, not "genders". As I say, I very much suspect this new usage has been brought about by people being squeamish about using the word "sex", cf. rooster v. cock. I regard this as silly.
I'm afraid I simply cannot bring myself to use what to me is predominantly a grammatical term, when speaking of how the sexes behave etc culturally.