2 Chronicles 20:33 KJV
Howbeit the high places were not taken away: for as yet the people had not prepared their hearts unto the God of their fathers.
Jehoshaphat led many reforms in his country and, though not a completely perfect man, he did do what was right most of the time.
The Bible says the reason why the high places were not taken away is because the people had not prepared their hearts unto God. Even if they were under the king's leadership, doing right, they were still not right in their hearts and that meant there were things in their lives that meant more to them than worshiping in spirit and in truth.
I understand these high places were not necessarily places to worship idols. They could have been personal places of worship, as Abraham had. But God had given them new orders of worship involving the Tabernacle and later the temple. To worship God in a place other than where He instructs is to not worship Him at all.
Today it is the church. If a person prepares his heart unto God, he will have his place in a church. He may say he worships the Lord in his own way, but any way that keeps him out of a church only reveals his heart is not prepared into God.