What word is better to use in the article - sex or gender?
Solution 1:
If this question had been asked half a century ago, the answer would have been obvious: sex. At that time, nobody would have thought of using gender in any sense other than the one it has in grammar. Feminist literature then introduced gender as a technical term, with the meaning that was, in that theoretical context, different from the established meaning of sex , even though related to it. The next step in the development of the usage of that word was that many people picked up that usage of gender, without paying full attention to its theoretical underpinnings, and started using it as a straightforward synonym for the traditional meaning of sex. Presumably, what motivated the widespread use of gender in that sense is that it made it possible to talk about being male or female, without triggering associations with the sense that sex has in constructions such as to have sex.
If one is writing in a field in which gender is used in the precise, technical sense, which is different from the relevant sense of sex, then, of course, the choice between the two terms will affect the precise meaning that one's words will convey, and should depend on what one intends to say.
On the other hand, in a context in which it is obvious that the theoretical distinction between sex and gender is not relevant to what one is trying to say (i.e. in a context in which, if one uses gender, one will be using it casually, in its everyday sense), the choice will be just a matter of style. The current trends seem to favour gender, but using sex for this purpose is still very far from being obsolete.
Generally, when writing a scientific or a scholarly article, it is wiser to base such terminological decisions on carefully observing how the relevant words are used in the recent literature in the same field, than on what somebody may post on a site like this one.