That is to say with the exception of U.S. citizens on our bases around the world. The Constitution is for the protection of American citizens from the federal government. It is graciously extended to those in the US both legally and illegally although an argument can be made against extending to the latter.
That means yes we can prohibit a particular group from entering this country. Those people do not have Constitutional protections until they are in this country. Therefore any immigration law is in effect Constitutional as long as it doesn’t affect U.S. citizens. Muslims in Syria or Iraq or whereverstan are not guaranteed any special right to come here.
A2S8 states that Congress shall make all laws concerning naturalization. Notice that, unlike the prohibition of religious tests for elected officials, it says nothing about religion here.