The text says that Jonathan’s sons were priests for the Danites until the day of the captivity of the land, more than 450 years after the events of this text. The mention of the captivity points to the Assyrian captivity in 734 BC (2 Kings 15:29), when Tiglath-Pileser III deported the population. This suggests that the final editing of Judges happened after the exile.
30 And the people of Dan set up the carved image for themselves, and Jonathan the son of Gershom, son of Moses, and his sons were priests to the tribe of the Danites until the day of the captivity of the land.