1 Chronicles - Chapter 17

David wants to build a temple for God:

"When David was settled in his palace, he summoned Nathan the prophet. “Look,” David said, “I am living in a beautiful cedar palace, but the Ark of the Lord’s Covenant is out there under a tent!”"

However, God tells David that although David will not build a house for him, God will build a house for David.

“O my God, I have been bold enough to pray to you because you have revealed to your servant that you will build a house for him—a dynasty of kings! For you are God, O Lord. And you have promised these good things to your servant. And now, it has pleased you to bless the house of your servant, so that it will continue forever before you. For when you grant a blessing, O Lord, it is an eternal blessing!”

The dynasty of kings was complete in Jesus, whose throne will last forever.