You could try praying to the Greek god/dess Hermaphroditus. S/he is the child of Hermes and Aphrodite, and was originally born male. His body blended with that of a naiad named Salmacis... and they became one inter-sex form. I don't know of any specific gender-swapping deity, but there are some fish that do that and I think a type of lizard...
I'm guessing you want to become male, so you could try praying to male gods that you admire (Adonis maybe?), but the fastest and surest way to get what you want is surgery. You can try living your life as a male without surgery (like dressing as a male, using masculine pronouns, a male name, etc) but do whatever is most comfortable for you. Maybe in time you'll come to terms with being a woman... you may have been born a woman for this specific reason, to learn some lesson you couldn't in this lifetime as a man.
Best Wishes :)