Right. I’d tell HIM, “look, the person who displayed so many ample qualifications for this position was a man. You’re a woman, so I don’t think you’re the one we’re looking for.”
Now that would be sex discrimination. I would tell him/her that this job is too sensitive and has no place for the gender confused.