The sworn virgins in Albania were the only example I can think of where it was only women who were allowed to become a third gender. Many third genders have been for gay men, and as others have pointed out, this was because the societies were very rigid about sex roles and hierarchical rankings so that gay men didn't comfortably fit inside the category 'men,' with its privileges.
What I have read about the sworn virgins in Albania suggests that they were a way for a family with no male heirs to continue the line by having one daughter lives as a man, learning all the male skills about running the farm, caring for the aged parents, and so on.
She was not allowed to have children, however, though she was allowed to have a female partner. I recall that her job was to be a place-holder for the ultimate male heir when one of her siblings' sons grew up.
It is a fascinating custom, and partly because it is so clearly based on the maintenance of the family's economic well-being and also based on the maintenance of patriarchy. The sworn virgins couldn't have children so that they couldn't pass the farm on to their own children. They could assume the male gender role only by completely relinquishing the female gender role.
It is unclear if becoming a sworn virgin was a choice or something a woman was forced to do for the sake of her family.