Nope. There can be job requirements that have to be met, but you cannot simply ban a protected class. It would be analogous to a firefighter position: you can set requirements such as the ability to carry a certain weight over a certain distance, but you cannot ban women from applying.