Yes. Even though churches and other places of worship are generally considered public places, they are private property. Therefore, they can restrict who is allowed to enter.