The accomplishment of this blessing depends upon both Judah and the Gentiles reversing their past conduct. Then shall the believing Gentile be admitted within the fold of the true, because spiritual, Israel - Christ‘s Church.
Matthew Henry
Concise Bible Commentary
The Lord would plead the cause of his people against their evil neighbours. Yet he would afterwards show mercy to those nations, when they should learn true religion. This seems to look forward to the times when the fulness of the Gentiles shall come in. Those who would have their lot with God's people, and a last end like theirs, must learn their ways, and walk in them.
SDA Bible Commentary (limited)
Volume 1-7
16. Swear by my name. If a heathen nation would turn to Jehovah, the God of Israel, that nation would “be built in the midst” of His people, that is, be counted as belonging to the Lord. It was God’s purpose that these nations should turn to Him and be added to His people, Israel.