In those ancient times Elam had been an established political state for a couple of millennia in the general region of Iran we know today as the province of Khuzestan when Jeremiah and Ezekiel received their prophecies. Back then Elam was a contemporary of Akkadia and Sumeria. Elam emerged from that domination circa 1300 BC, and over hundreds of years there emerged within Elam two regional powers, Susa, with which we're eminently familiar from the Old Testament, and Anshan. In those ancient days the kings of Elam were known as "the king of Elam and Anshan.
Then, circa Nebuchadnezzar the First (Nebuchadnezzar I) reign, about one-hundred some-odd years prior to King David's rule in Israel, the western half of Elam came under the control of the Babylonian Empire, while in the east, in Anshan, the Achaemenids began establishing what would come to be known as the Achaemenid Persian Empire. Before taking on Babylon, as the Bible recounts for us, successive kings of Anshan (Achaemenes, Teispes, Cyrus I, Cambyses and finally Cyrus II (Cyrus the Great 559 BC) took all nations and empires east of the Tigris River, until the sack of Babylon, as we know from Scripture. The languages of this second of the great world empires after Babylon was Persian, Elamite, Akkadian and Aramaic as the official language of government.
The point here is that from a bible-based eschatological perspective, Elam and Persia are virtually synonymous. This is why Ezekiel used both names. And this is how Eschatology Today interprets Jeremiah 49:34-39 and Ezekiel 38:5 as referring directly to the modern-day Islamic Republic of Iran. In the days of Jeremiah and Ezekiel both Elam and Anshan (proto-Persia) were located within the same geographic region of southwestern Iran.