This is not a contradiction but Hebrew poetry.
The logic may be compared to the anointing of David. Spiritually David became king the moment Samuel anointed David and the Spirit of the Lord departed from king Saul. Nevertheless David had to wait 15 years from the time he was first anointed by Samuel to the time he became king over Judah and another seven years before David was anointed king over all of Israel.
It is the same here:
Commentators on 2 Kings 24:8 and 2 Chronicles 36:9 explain that Jehoiachin was, in fact, crowned twice. Shortly after Jehoiachin’s father, Jehoiakim, began his reign, he (or the king of Egypt) crowned his eight-year-old son as heir to the throne, to ensure that Jehoiachin would become king after him. See Jehoahaz and Joiakim and Jehoiachin.
Peace