It has probably been dealt with before, but is so rare that the issue is not common knowlege. In otherwords the vast majority of the posters on this forum, including myself, don’t need to know what the Church teaches regarding this.
If you’re speaking in “hypothetical” terms, in order to further understand the Church’s teaching on marriage and sexuality - this thread probably belongs to the Moral Theology section.
If you or an aquaintence are in a real-life situation such as this, then I suppose either Family Life or Moral Theology would be appropriate.
The church’s teaching is based on natural law. What you are speaking of, though it occurs “in nature”, is considered an anomaly, or a “freak” to use an unkind term.
The Church teaches that people with homosexual tendency’s are called to celebacy. That’s interesting because She’s teaching that they should not be married, even to a member of the opposite sex as frequently happens. In other words, a person may be physically healthy w/ respect to their sexuality, but because of a mental defect they should not be married at all.
Perhaps this also applies to the 5-alpha-reductase deficiencies. If they are physically capable of consummating the vows, but have some mental confusion over who they are, and who they are attracted to, perhaps they best not get married.
No that’s my speculation based on teaching regarding homosexuality. Also note that I’m not certain if the Church teaches that “homosexuals are called to celebacy” then She officially will not allow a homosexual to marry - even a person of the opposite sex.