(1) I've thought of that conversation many times as I have wrestled with one of my favorite biblical characters, David, who has been the subject of one of my regular elective courses, (2) and who is the centerpiece of 1 Chronicles, on which I have just written an extended commentary.
Instead, in 1 Chronicles 22-29 the Chronicler presents a whole series of new farewell speeches of David, surveyed in the following paragraphs.
They paraphrase the content of 1 Chronicles 17 // 2 Samuel 7, in which David's plans for building the temple are rejected, while he is promised a son, Solomon, who is designated as the temple builder.