This *may* be one of the rare cases where a sex-based preference is legal. Generally, sex discrimination in employment is illegal; hiring, etc. decisions must be made without regard to gender. But there are  a handful of jobs were sex is a legitimate business requirement; in those, employees may hire based on sex. Exotic dancers are an obvious exception; another are the restroom attendents that some high-end restaurants or hotels have, since you would not have a woman in a men's room or vice versa. IF the schols are hiring for a position where part of the job may be monitoring the girls' changing/locker room, then sex is a legitimate factor: having a male teacher go into the ladies' locker room could be problematic. But if something like that is not an issue, then this is likely illegal discrimination.