David brought the Ark of the Covenant to Jerusalem, intending to build a temple, but God, speaking through the prophet Nathan, announced that the temple would be built at a future date by one of David's sons (Solomon).
David brought the Ark of the Covenant to Jerusalem. David was intending to build a temple. The temple would be built at a future date by one of David's sons (Solomon). This was what God announced.