The Hebrew word רעך is commonly translated as "neighbor". This isn't the best translation. A better translation might be "close friend", or "fellow". The word is used to apply to any Jew, technically, as all Jews should be "close" to each other in terms of responsibility and caring. In any case, certainly, in the commandment, it is not restricted by geography.
As for the general point of this commandment not to covet anything that belongs to your "fellow" (I'm using my loose translation, here. Also, see the end of the verse. that says "everything". I won't delve into the concept behind itemizing prior to saying "everything".) is a question raised by several commentators.
Ibn Ezra asks how is it possible that someone cannot covet something nice that he sees? He explains that this is exactly the concept of training one's heart and mind. His example is that one does not covet the princess, because he knows that he can't do this (she's the king's daughter, and if he is a villager, he is unworthy to bother with the princess.) Likewise, one does not covet his mom even if she is beautiful.
So the Torah is stating a general rule - train your mind to be satisfied with what G-d has given you so that you will have no reason to covert anything that belongs to any Jew, regardless of where he lives.
@Danno is correct in that the Torah frequently expresses things in what is most "familiar". I.e., in this case, it would be relatively easy to covet your close friend's wife, because, after all, you are close to your friend, and maybe, you have become friendly with his wife. So, in a sense, the Torah may be making a specific point by stating don't do this with anyone, not even your close friend's wife.