Biological and cultural/historical. There is rather strong clinical evidence on the healthcare side of things, and an understanding of intersex biology (including how the the brain develops, not just the classically understood intersexes) shows a complex picture of where various components of gender may originate from on a biological level.
But yes, much of what Foucault taught us about the arbitrariness of being a human in a culture does still ring true. No, it doesn't discount the hard evidence from biology and psychology.
Is the "transgender science" you talk about more like biology, i.e. describing how things are, or more like anthropology, i.e. describing what some (sub)cultures believe? Those are not the same things.