2 Kings 21:8 (ESV)

8 And I will not cause the feet of Israel to wander anymore out of the land that I gave to their fathers, if only they will be careful to do according to all that I have commanded them, and according to all the Law that my servant Moses commanded them.”

The writer continues here by citing what the Lord says. The Lord has said these things numerous times (e.g., 2 Samuel 7:1–29, 1 Kings 2:2–4, and 1 Kings 2:2–4). See also 1 Kings 9:3 where you clearly read the promise, that the Lord’s eyes and heart will be there for ever.

The temple is the symbol of God’s presence; and when the Lord is present, the people can live undisturbed in the land the Lord has given them. But that does not mean that the people can do whatever they want. When the Israelites left the Lord, and cut the ties with him, they had broken the covenant. And when the bond between the Lord and his people was gone, the Lord could not and would not fulfill his promises. This warning was also announced (see 1 Kings 9:6–7). And that is the situation we now have here.