I will be his father, and he shall be my son. When he commits iniquity, I will chasten him with the rod of men, with the stripes of the sons of men;
but I will not take my steadfast love from him, as I took it from Saul, whom I put away from before you.
And your house and your kingdom shall be made sure for ever before me; your throne shall be established for ever.'"(2 Samuel 7:14-16)
This does not mean that there will always be a king in Israel (obviously). If the nation is disobedient, there will be no king or kingdom. But, this does not mean that God would put someone else on the throne other than one of Solomon's descendants. They will be "chastened", but, unlike Saul, this line will not lose the right to kingship.
Behold, a son shall be born to you; he shall be a man of peace. I will give him peace from all his enemies round about; for his name shall be Solomon, and I will give peace and quiet to Israel in his days.
He shall build a house for my name. He shall be my son, and I will be his father, and I will establish his royal throne in Israel for ever.' (1 Chronicles 22:9-11)
The author of Matthew was probably aware of this, because he does list the genealogy through Solomon:
and Jesse the father of David the king. And David was the father of Solomon by the wife of Uri'ah (Matthew 1:6)
By the way, this line lost kingship after being carried away into Babylon.