Following God does not mean that we will never have problems (see Job if you aren't sure about that). But it does mean that God is constantly looking out for our best interests. In fact, even when we are disobedient, and God allows ruin and destruction in our lives as a result of our disobedience, His end game is still for our good. For the good of our eternal soul.
It does suggest that when our enemies surround us and overtake us, it is because we are not where God wants us to be. There has been a lot of talk over the past year about making this nation great again, but the only thing that makes a nation great is being devoted to God and living in accordance with His statutes - and this nation has never fully done that. Like people of all nations and every time period, like the Israelites who received the statutes directly from God through Moses, we have failed in a multitude of ways to uphold what is right and good. Whether it was Southern slaveholders paying lip service to God while fighting for the right to hold their brother and sister in Christ in chains, or those pushing West driving the original inhabitants of the land into smaller and smaller tracts, with many dying along the way, or men abusing and mistreating women with no justice for their cruelty, or parents abusing their children in the name of religion. Romans 3:23 puts it succinctly: "All have sinned and fall short of the glory of God."
But the second part of the chapter offers hope. Hope for the Israelites when they were in Babylon in direct fulfillment of all that God prophesied in this chapter, and hope for us whether we live in the US or any other nation. “But if they confess their iniquity and the iniquity of their fathers in their treachery that they committed against me, and also in walking contrary to me, so that I walked contrary to them and brought them into the land of their enemies—if then their uncircumcised heart is humbled and they make amends for their iniquity, then I will remember my covenant with Jacob, and I will remember my covenant with Isaac and my covenant with Abraham, and I will remember the land." Of course, this promise was for the Israelites, but it applies to any nation, and to any individual.
If we humble ourselves, acknowledge the fact that we have failed to live a life that honors God in every way, and confess, God is faithful and just to forgive our sin. He is faithful to His promise to provide for our needs and to give us peace that surpasses understanding.