Two considerations. First of all, in-story diversity is good, including in-group diversity. If there are two factions of goodguys and two characters from each, default to each one having one male and one female. Second, and more insightfully, use cultural double-standards to pick.
Sometimes a cultural double standard exists such that the audience's opinion of a character will vary based on their gender. For example, it's an extremely widespread stereotype that when there's a conflict of "justice versus mercy" or "anger versus compassion", men favor justice and women favor compassion.
This means that when people see a man arguing for the justice side in one of these situations, they're more likely to write him off with "well he's a guy, of course he's going to err on the side of being too harsh", even if only subconsciously.
Therefore, if you want to make a story that challenges our culture's insane "turn the other cheek" ideology, it's probably a good idea to make the didactic character female. Likewise to challenge the total reversal of that standard that appears in the context of government where mercy and giving a repentant criminal a chance to redeem himself cease to exist, make the character male.