The explanation had to fit the facts. When Jon saw the genitals of his family, everything was normal--yet Zoe talked about having a penis.
The only possible explanation is that Zoe did not have a penis when Jon looked at his family's genitals, but she did have a penis at other times. Which meant that there was a way to transform genitals.
It was caused by a second magic item, also from his grandfather; there was a piece of stone with a red gem in it. Rubbing the gem and concentrating would transform the genitals of a nearby person (normally the user). If they were normally male and got female genitals, they would not have periods or become pregnant, although the item's user could change this by telling it to make the pregnancy guaranteed instead (sex still required)--guaranteed didn't count as a "risk", a risk was some value that was not certain.
Wondering if his grandfather really gave him the second magic item or if his wish had just conjured it up, Jon looked around for the magic item, but he didn't see it anywhere.