The distinctions between gender and sex are complex and controversial (to say nothing of the issues of sexual orientation).
A discussion of these issues can be found in this article in Wikipedia. The article suggests that there is a differentiation between
sex, the biological makeup of an individual's reproductive anatomy or secondary sex characteristics, from gender, social roles based on the sex of the person (culturally learned) or personal identification of one's own gender based on an internal awareness (gender identity).
Many would disagree, and the article points out some of those areas of disagreement.
In any event, the terms are often used interchangeably to refer to either self identification or societal ascription of male and female identity or roles.
It is likely to come down to how the term is being used, and whether there will be an explication of the import of the term to the issue being addressed .