“if it seems evil.” In this context, “evil” does not mean morally evil, but “unprofitable,” somehow hurtful. Joshua is saying that if the people see no value in serving Yahweh, then they should choose who they will serve.
“the gods that were beyond the Euphrates River.” The gods go with the land, and influence what happens in their domain.