The main reason God did not allow David to proceed with his plans to build Him a house (temple) was that God, not David, was sovereign. A secondary reason was that David was a man of war (22:8; 28:3). God reserved the right to choose who should build such a place as well as when and where he should build it. It was inappropriate for David to decide these things, though his desire to honor God in this way was certainly commendable. David's plans were premature and presumptuous (cf. Israel's desire to have a king like all the other nations) though pardonable because he sought to glorify Yahweh.
"In Near Eastern thought there was a widely recognized relationship between the earthly kingship and the temple of the protecting deity of the city-state. The state was seen as a reflection of the cosmic reality of the divine government, which stood behind the state. The state, with its various hierarchies, culminated in the earthly kingship at its apex. This was thought to be parallel to a cosmic state of affairs with its own gradations in which the major deity headed a pantheon of lesser deities. The ultimate kingship of the protecting deity was thought to be expressed through, and paralleled by, the empirical kingship exercised by the ruler of the city-state on earth. This concept was given concrete expression in the relationship that existed between the temple of the city-state and the palace of the king of the city-state. The temple was the earthly residence of the deity, and the palace was the residence of the earthly representative of the deity, that is, the king."57
"Often we may have to accept that the work which we would dearly like to perform in terms of Christian service is not that for which we are best equipped, and not that to which God has in fact called us. It may be, like David's, a preparatory work, leading to something more obviously grand. Recognition and acceptance of our true measure is the first and necessary step towards seeing the significance of what, in God's purposes, we really can achieve and have achieved."58
God's plan was that David's son would build Him a house, and He revealed this to David (vv. 11-15). However these words look beyond Solomon to One who would not fail to fulfill all God's purposes as David's descendant.
"This verse [13] along with Psalms 2:7, 12, is one of the major OT revelations on the deity of the Messiah. It foretells Jesus' being uniquely God's son (Heb. 1:5; cf. Acts 13:33; Heb. 5:5), for it is not really applicable to Solomon (cf. comment on 22:10) or to any other of David's more immediate successors . . ."59
In 2 Samuel 7 the warnings of discipline if David's descendants failed God focused attention on Solomon and the kings that followed him through Zedekiah, the last king of Judah. In 1 Chronicles 17 those warnings are absent. This fact probably indicates that the Chronicler was looking beyond the kings of Judah who had failed and died to the King who was yet to come. This king would carry out God's will perfectly (cf. Isa. 9:6; John 4:34). This would have given the restoration community renewed hope.60
"Though there can be little argument that the covenant with David was unconditional both in its granting and in its perpetuity, the benefits of that covenant to David and to the nation depended on their obedience to the terms of the Mosaic Covenant within which the monarchy functioned. In this respect and only in this respect was the Davidic Covenant conditional."61