You can only change the original NPCs into ones of the same gender.
However as far as I've figured, you can make it so the AI treats the character as the gender that you want by adding that detail in different ways, such as in the Public/Private Character Description, and in the character's Set Knowledge.
I don't know how far you have to go exactly, and the more stuff you change from the original NPC's original settings the more different they will become from their usual self.