David was not allowed to build the temple because he was a man of war.
The Lord has made a place in which to dwell through our redemption, sanctification and baptism with His own Spirit..