No cheat exists to change your character's gender in Pokémon Pearl. The game lacks this functionality; no known codes/hacks achieve it. Gender is chosen at start and fixed for the playthrough.