Not so.

Gender: the state of being male or female (typically used with reference to social and cultural differences rather than biological ones).

Biological/physiological sex is innate.  With the rare exception of chromosomal anomolies, your sex is determined by your chromosomes.