2 Chronicles 1:4

But the ark of God had David brought up from Kirjath-jearim to the place which David had prepared for it: for he had pitched a tent for it at Jerusalem.

David had brought the ark of God up from Kirjath-jearim to Jerusalem and set it in the tent he had prepared for it there. This is why, when Solomon went to Gibeon, the ark was in Jerusalem while the old wilderness tabernacle with its brazen altar still remained at Gibeon. Solomon and the congregation went to that tabernacle and altar at Gibeon and offered sacrifices there.