Wiki Details
The Jebusites (; Hebrew: יְבוּסִי, romanized: Yəḇusi) were, according to the Book of Joshua and Books of Samuel from the Hebrew Bible, a Canaanite tribe that inhabited Jerusalem, called Jebus (Hebrew: יְבוּס, romanized: Yəḇus, lit. 'trampled place') before the conquest initiated by Joshua (Joshua 11:3, Joshua 12:10) and completed by David (2 Samuel 5:6–10). According to some biblical chronologies, it was conquered in 1003 BC.
A majority of scholars agree that the Book of Joshua holds little historical value for early Israel and reflects a much later period.
1 Chronicles 11:4 states that Jerusalem was known as Jebus before this event. Scholars sometimes dispute the identification of Jebus with Jerusalem.
Joshua conquered the Jebusites in Jerusalem before David and King David bought the threshing floor from the Jebusites
General info from Wikipedia.org