Well, what you define here as "gender" would more accurately be described as biological sex or structural anatomy.
Yes, there are mainly two biological sexes, if we're talking solely in terms of one's anatomy -- not withstanding people who have hermaphroditic anatomy.
But as far as gender identities go, there are certainly more than two. There are multiple (more than two) genders, if we're looking beyond an anatomical dichotomy (as we should be).
Since I'm cisgender, I don't want to speak for the experience of people who are transgender. I prefer to hear the narratives of people who wish to share how their sexual and gendered experiences do/don't line up with their bodies assigned at birth.