Hi, Debby
If your official documents state female then I can't imagine there being any legal barriers, at least if your country has separation of church and state and doesn't have an independent ecclesiastical court with separate jurisdiction over such matters.
Where non-legal barriers are concerned, one is the hypothetical situation that your parents and you belong to a national church, the church has been delegated recordkeeping, its birth records are handwritten (and thus haven't been updated automatically), state "male" AND the priest doing the ceremony looks at them and objects.
The morality I would believe depends mostly on your own sense of ethics.
If the priest is adamantly against such marriage and you lie in order to get him to carry out the ceremony, then it would be just like any other situation where you get someone to do something that they'd not do unless you deceive them.
Alternatively, if the priest is for you but your church as an institution strongly believes that marriage should only be allowed between a genetic man and woman, and/or you yourself feel that other types of marriages are against your god's will, then I guess you would also experience discomfort...