Re: what does 'the same gender' mean?
Off the top of my head: human *bilogical* genders, as dictated by genetics and hormone levels:
XX (Androgenic, non-PCOS)
XX (Androgenic, PCOS origin)
XXY (Non-Klinefelter, Male identity)
XXY (Non-Klinefelter, Female identity)
XXY (Non-Klinefelter, Binary identity)
In addition, humans can be born as chimeras (sometimes called "mosaic individuals") containing cells that consist of two or more combinations of the above. (Though there had yet to be a documented case of a human chimera with more than two origin cells.) Chimeras are where two distinct zygotes fuse into a single being. Instead of having the DNA of only one individual, some % of the cells (usually half) are from one individual and some % of the cells (usually half) are from another.
This can lead to human chimeras where, for example, half the individual's cells are XX and half are XY. More than that; it's not just the sex chromosomes that are different, the entire DNA is different, as different as they would be between brother and sister. That is because, in effect, the chimera(XX, XY) is their own brother and sister.
All of this is before we get into epigenetic issues that can cause hormonal changes in individuals from a young age which absolutely can and do alter gender identity at a very fundamental level during or before puberty.
Human "sexes" are not binary. We have way the hell more than just two biological sexes, and we have even more genders. All from a biological and hormonal perspective, without needing to touch "choice" as part of the equation.
And I am sure I'm missing a few in my list above. Check your prejudice, eh?