Problem: Joshua 15:8 lists Jerusalem in Judah, but Joshua 18:28 says it is in Benjamin.
Solution: Both are true. Some scholars also point to a Jewish tradition that held the altars and sanctuary were in Benjamin, while the courts of the temple were in Judah. Be that as it may, the city was actually within the limits of Benjamin’s territory, but it was also on the border of Judah’s land. So it may properly be described as being part of both.