Judges 2:6 correct wording by adding "Now" before the sentence and "had" as the helping verb. This connotes that this parenthetical reference to Joshua is from a prior period to provide background for the following description of Israel's loss of covenantal obedience.
Judges 2:2 change wording from "You must make no treaty with those who live..." to what you see because the same word (berith) is used. There is a special significance to "berith" or "covenant" with religious connotations. That's why there is the reference in the next sentence to "altars."