A severe warning hangs over the choice to abandon God's path in favor of idol worship. To turn away in this context means to regret choosing the good path and to actively depart from it [ביאור שטיינזלץ]. This stark caution is directed broadly, either addressing the entire nation of Israel as a whole [מצודת דוד], or speaking directly to King Solomon alongside the people [רד״ק].
The exact nature of this betrayal and its resulting punishment becomes clear when comparing this account to the parallel record in the Book of Kings. The record in Kings describes a scenario of total, permanent abandonment of God spanning multiple generations. Such an absolute rejection by the people and their children carries the ultimate penalty of complete destruction.
In contrast, the account here in Chronicles focuses on a more limited failure, describing a situation where only the current generation strays from God's path. Because the betrayal is confined to a single generation, the punishment is adjusted accordingly. Rather than facing total annihilation, the Israelites would be uprooted from their land, and God would remove His Divine Presence from the Temple. However, under these specific circumstances, neither the nation itself nor the Temple would face complete destruction [מלבי״ם].