Yes, God can withdraw His protection from any nation that continually turns its back on Him. It happened with ancient Israel, and it can happen to us. The Bible says, "Woe to those who call evil good and good evil. ... (the Lord's) hand is raised and he strikes them down" (Isaiah 5:20, 25).
But that doesn't mean we should stop praying for our nation, or quit standing up for what is right and opposing what is wrong. After all, we don't know the future -- and God may intervene in unexpected ways and bring spiritual revival in our midst. How different would our nation be if God's people prayed for it every day? We also need to pray for our leaders, because they bear a very heavy burden and need God's wisdom.
Do you remember Jonah? God told him to go to Nineveh, the capital city of one of the most pagan nations on earth. At first, Jonah refused to go (which is why he fled and was swallowed by a great fish). But when he finally preached the message God had given him, the people of Nineveh repented of their evil ways. The Bible says that God "had compassion and did not bring upon them the destruction he had threatened" (Jonah 3:10). They were spared -- and the same could happen in our generation.
Make sure of your own commitment to Christ. Then make it your goal to live a life that honors him. Pray too for those around you who do not know Christ, that they will turn to Him and help reverse the evil trends we see around us.