Context does mean a big deal, but this prophesy did not see a complete fulfillment in Solomon.
Verse 16 reads:
"Your house and your kingdom will be secure forever before you; your throne will be firmly established forever."
How can we be certain that the meaning of the Hebrew o'lam here is "forever" and not "many years"? The 89th Psalm equates David's throne to endure like the sun and to be firmly established as the moon. (Ps 89:35-37)
Solomon did not live long enough to have that proved true, and the throne was emptied for a time starting with Zechariah being deported to Babylon.
So you're saying that verse 16 is referring to Jesus too? That's even worse! This verse is in second person, not third: its what Nathan was commanded to tell David.
Let's start from the beginning:
8. And now, so shall you say to David my servant, "So said G-d of Hosts, 'I took you from the sheep pen, from behind the sheep, to be a leader over my nation over Israel.
This is what G-d told Nathan to tell David. David was a shepherd and G-d made him into a king.
9. And I will be with you, wherever you go. And I shall cut down all your enemies before you. And I will make you a great name. Like the names of the great ones that are in the land.
G-d is telling Nathan to tell David that He will always be with David. And He will take down David's enemies and make him famous.
10. And I will make a place for my nation Israel and I will plant him. And he shall dwell under it.and he shall not be disturbed again. And the sons of sinners will no longer afflict him as at first.
G-d is telling Nathan to tell David that He using tree metaphors that He plans to have Israel settled securely and peacefully in the land.
11. And from the day I commanded Judges (to lead) over my nation. And I will give you rest from all your enemies. And G-d is tell you, that G-d will make you a house.
The first part of this verse is a continuation of the previous verse. G-d is telling Nathan to tell David that He plans to settle Israel peacefully and not like how it was in the times of the Judges. The verse ends of with G-d telling Nathan to tell David that he (David) will begin a house of kinship, ie. future kings will be from the
house of David.
12. When your days are filled, and you lay with your fathers. And I shall establish your seed after you, that has come out of your stomach. And I shall establish his kingdom.
G-d is telling Nathan to tell David that after David dies, G-d will establish his son Solomon as the king after him.
13. He will build a house for my Name. And I will establish the throne of his kingdom forever.
G-d is telling Nathan to tell David that Solomon will be the one to build the Temple. And G-d will establish Solomon's throne forever. Obviously Solomon dies. However, all future kings of Judah as well as the eventual messiah, are only through the Solomonic line.
14. I will be for him as a father, and he will be for Me as a son that in his sin and I shall chastise him with the rod of of men and the plagues of the sons of man.
G-d is telling Nathan to tell David that He will treat Solomon like his own son, chastising him when he goes astray. G-d does this through people like Hadad the Edomite and Rezon the Syrian both of whom were Solomon's enemies.
15. And my kindness will not be removed from him as I removed it from Saul which I removed from before you.
G-d is telling Nathan to tell David that He will not remove the kingship from Solomon as He did from Saul in favor of David.
16. And your house and your kingdom shall be trusted until eternity, before you. Your chair shall be established forever.
G-d is telling Nathan to tell David that David's kingship is an eternal one. Only the Davidic line (through Solomon per verse 13) has a legitimate claim to the throne. As opposed to Saul, the kings of Israel and the Hasmoneans whose kingships were temporary.
The verses here are not meant to be understood literally, that David will always be the king, because David does die as does Solomon. We see the same type of prophecy to Judah, from Jacob "the rod shall not be removed from Judah". How could Jacob prophecy that when Judah wasn't even the king for the rod to be removed from him? Rather it means that only the tribe of Judah has a legitimate claim to the throne. Until David came. Then only the sons of David had a legitimate claim to the throne. Until Solomon came. Then only the sons of Solomon had a legitimate claim to the throne.