This teaching is not about geographical distance. You can only be a neighbor to people who are physically near you, at least in the time of Christ, before skype, email, etc, it was not even a consideration that you could transcend distance.
The idea that distance was unimportant comes, I believe, from the fact that all four people were travelling to Jericho from somewhere else. But I think the spiritual message there is that we are strangers in the world, not that we can be neighbors to people far away. They were all potential neighbors in the city of Jericho.
Rather than redefining the definition of neighbor to ignore distance, it defines it to only consider distance and not background. Help those in front of you, regardless of what journey they took to meet you.
This may be hard to understand for us if we don't know the levels of division in judea at the time of Christ.
Background
Those who did not go to Jerusalem to participate in the three mandatory pilgrimage feasts were forever cut off from the people. With the dedication of the temple, it became the only place in Israel suitable for sacrifice, and all other high places were declared abominations, even if these high places were established by the partriarchs. This was a problem for the seceding tribes, who found Jerusalem outside their borders.
Thus during the split with the south, the northern tribes set up their own holy places as the kings of Israel did not want their population going to Jerusalem to worship during the high holidays. From the point of the judea, the northern tribes were thus cut off. This setting up of high places meant the north was much more idolatrous than the south.
Then when the Assyrians captured the northern tribes, they deported large numbers of people and introduced foreigners to the land who were not jewish. These foreigners intermarried with the locals and so the bloodlines of the northern tribes were considered polluted.
Then judea went into captivity, with some being taken to Babylon and others remaining behind. Jeremiah commanded the jews to go to Babylon and declared anyone who did not go to Babylon to be cursed. Writing to the exiles, he states in Jer 29:16-19:
for thus says Yahweh concerning the king who sits on the throne of
David and concerning all the people who live in this city, your
fellow kinsmen who did not go with you into the exile— thus says Yahweh of hosts, ‘Look, I am going to send among them the sword, the
famine, and the plague, and I will make them like rotten figs that
cannot be eaten because of their bad quality. And I will pursue them
with the sword, with the famine, and with the plague, and I will make
them a terror to all the kingdoms of the earth, a curse, and a horror,
and an object of hissing, and a disgrace among all the nations to
which I have driven them, because they did not listen to my words,’
declares Yahweh, ‘when I sent to them my servants the prophets,
sending over and over again, and they would not listen,’ declares
Yahweh.
So those who remained behind were also considered cut off from their people. When Nehemiah and Ezra rebuilt the temple and restored the sacrificial system, they instituted a series of racial purity laws that required jews to document both their bloodlines and the fact that they were in Babylon in order to participate in temple worship and be considered part of the community. It was forbidden to marry those of impure blood or to allow them in the synagogues or to participate in the sacrificial system. This created a caste system where many people were considered outside the group even if they were physical neighbors of each other.
Situation at the time of the parable
The outsiders were called Samaritans if they were descended from the northern tribes, but there was also exclusion of other groups as well. In addition to this general dichotomy, the judeans themselves fractured into various sects, such as pharisees, sadducees, zealots, essenes, etc. The Hasmoneans seized the throne but were not of the line of David, which caused some groups to reject them. Then they seized the priesthood but were not of the line of Zadok. This created more dissension. By mixing the office of high priest and king, you ended up with priests who were not Levites. All of these sects tended to not consider other members of different sects as part of their community even if they were in the same geographical area.
This type of fractured society sets the scene for Jesus' parable.
The parable
There are four people:
a "certain man" from Jerusalem, but the man's sect is not mentioned -- jerusalem was home to representatives of all these communities. I think this is important. He is on a journey in a foreign place.
A "priest" who is (ostensibly) not a Levite. He is also on a journey.
A Levite who is from a different clan than the priest, also on a journey.
The Samaritan, also on a journey.
These four people all meet in one place, in Jericho. The issue isn't distance, but tribal affiliation. There was no skype or zoom back then. It was not even a consideration that you might be a neighbor to someone you couldn't touch or physically be near.
These four were in the same city, Jericho, but they had different backgrounds.
Of these four, the Samaritan is the one who helped, and by virtue of helping, he became a neighbor to the man.
Message of Parable
As we travel through the world, we encounter people in our local physical communities who have a need, and if we overcome our sectarian divisions and show mercy to them, then we become neighbors to them. This is not about overcoming physical distance, but overcoming everything except distance. If anything, it is a parable about hyper-localism. Just as we are to eat what is set before us, we are to help those in front of us.
Note that this is the exact opposite of modern culture, where we are fracturing into online or virtual communities based on affinity groups that ignore distance, similar to the sectarianism of Palestine at the time of Christ. This creates a situation in which two people who live next to each other might be complete strangers if they are members of separate affinity groups. I.e. this is a symptom of cosmopolitanism.
Difference with cosmopolitanism
Cosmopolitanism is the sense that you abandon your tribal affiliation and become a citizen of the "world", a member of a global community rather than of a local community. Actual manifestations of cosmopolitanism requires allegiance to a dominant international culture that vies with the local culture. In the time of Christ, that was Hellenism. This was a growing issue with Hellenization during this period, as jews began to adopt Greek customs, some stopped circumcision, others performed painful procedures to reverse circumcision, and were more interested in the common (Koine) greek, greek literature, etc.
Jesus was clear that we are to be strangers in the world, rather than citizens of the world, and that the world will hate us, that we must not love the world. Rather than be members of a global community, we are to be reviled and excluded by the global community. But we are members of a spiritual community, the body, but we meet other members of the body by encountering people in our communities.