That verse in Jeremiah is one of the most misused verses in the Bible. You need to look at the context. Here it is in the original passage:
(Jeremiah 29:4-14 NIV) This is what the LORD Almighty, the God of Israel, says to all those I carried into exile from Jerusalem to Babylon: {5} "Build houses and settle down; plant gardens and eat what they produce. {6} Marry and have sons and daughters; find wives for your sons and give your daughters in marriage, so that they too may have sons and daughters. Increase in number there; do not decrease. {7} Also, seek the peace and prosperity of the city to which I have carried you into exile. Pray to the LORD for it, because if it prospers, you too will prosper." {8} Yes, this is what the LORD Almighty, the God of Israel, says: "Do not let the prophets and diviners among you deceive you. Do not listen to the dreams you encourage them to have. {9} They are prophesying lies to you in my name. I have not sent them," declares the LORD. {10} This is what the LORD says: "When seventy years are completed for Babylon, I will come to you and fulfill my gracious promise to bring you back to this place. {11} For I know the plans I have for you," declares the LORD, "plans to prosper you and not to harm you, plans to give you hope and a future. {12} Then you will call upon me and come and pray to me, and I will listen to you. {13} You will seek me and find me when you seek me with all your heart. {14} I will be found by you," declares the LORD, "and will bring you back from captivity. I will gather you from all the nations and places where I have banished you," declares the LORD, "and will bring you back to the place from which I carried you into exile."