Here God speaks to the people of Jerusalem as if he were speaking to the city itself. Alternate translation: "Accept discipline, you people of Jerusalem ... make your land into a ruin, an uninhabited land" (See: [[rc://en/ta/man/translate/figs-metonymy]])
"Accept discipline" here is a metaphor for learning from discipline. Alternate translation: "Learn from your discipline" or "When I punish you, learn to do what is right" (See: [[rc://en/ta/man/translate/figs-metonymy]])