Visitors from other lands
You have listed the most common languages spoken in Jerusalem already -- Hebrew, Greek, Aramaic, and even some Latin -- but the passage in Acts that you refer to answers your question:
there were Jews living all over the place in the ancient world, even before the diaspora after the two wars with the Romans in the first century (CE).
- An example previously given in the Gospels is Simon the Cyrene (He's
from what is now Libya, Cyrenacia), and is one who helped Jesus carry the cross to Golgotha (per the Bible).
- Consider also that Saul of Tarsus (the Apostle Paul) was a Jew from
somewhere other than Israel/Palestine/Judea -- Tarsus is in Cilicia
which is now part of Turkey. (IIRC, he was what is called "a
Hellenic Jew" but that's a different topic).
Acts 2 (5-13)
Now there were devout Jews from every nation under heaven staying in
Jerusalem. At this sound, they gathered in a large crowd, but they
were confused because each one heard them speaking in his own
language. They were astounded, and in amazement they asked, “Are not
all these people who are speaking Galileans? Then how does each of us
hear them in his own native language? We are Parthians, Medes, and
Elamites, inhabitants of Mesopotamia, Judea and Cappadocia, Pontus and
Asia, Phrygia and Pamphylia, Egypt and the districts of Libya near
Cyrene, as well as travelers from Rome, both Jews and converts to
Judaism, Cretans and Arabs, yet we hear them speaking in our own
tongues of the mighty acts of God.” They were all astounded and
bewildered, and said to one another, “What does this mean?” But
others said, scoffing, “They have had too much new wine.”
Short answer: they were visitors, merchants, diplomats, pilgrims, or a combination of all of the above. Thus people from all over were present but may not have lived in Jerusalem permanently. For example, a Parthian or a Mede would speak a tongue related to Persian (Middle Persian, thank you @T.E.D.); some of the others a Greek dialect (there were multiple dialects, so you'd expect those in Cappadocia or Pontus to speak regional dialects), Egyptian, etc. Those from Elam spoke a tongue not thought to be related to the commonly spoken languages mentioned:
Elamite is traditionally thought to be a language isolate, and
completely unrelated to the neighbouring Semitic, Sumerian (also an
isolate), and the later Indo-European Iranian languages that came to
dominate the region. It was written in a cuneiform adapted from the
Semitic Akkadian script of Assyria and Babylonia, although the very
earliest documents were written in the quite different "Linear
See also: Jews in the Graeco Roman World by Martin Goodman.
(@John Dee has pointed out that the most common Greek dialect in the Holy Land at the time was Koine Greek)
Picture source: https://www-tc.pbs.org/wgbh/pages/frontline/shows/religion/maps/art/jewish.gif