A boy was told by school leaders that he had to tolerate sharing a locker room with a female student