A pure intention carries profound weight, counting as a tangible achievement even if circumstances prevent a person from carrying it out. God communicated with David through the prophets [ביאור שטיינזלץ], highlighting the immense value of the king's deep desire to build the Temple. God praises David directly for this ambition, acknowledging that his sheer goodwill stands as a massive merit. It was specifically because of this inner drive that the practical preparations and the ultimate command to construct the Temple were set into motion [מצודת דוד].
The depth of this intention was entirely genuine. David's goal was to build a house exclusively for God, completely free from any personal or hidden motives. Because this thought was so pure, God viewed it as though the Temple had already been fully built within David's own heart [מלבי״ם].