K.,
I would suggest my 2nd grade daughter to be compassionate to the elder neighbor-girl and tell her: "I understand, you need some space, but please know that whenever you will need a true friend, I am always here for you".
See, K., we do not know the whole situation, and to BLAME the elder girl is useless anyway. There are so many different situations in children's lives, and so many different times of growth, that require very gentle loving caring approach.
If your daughter will approach the situation wisely like this, they might be great friends later on again.
I'd take care of my side of the fence, first, making sure that my girl is not frustrated, angry (this is not good!), or sour.
After all, who said that life is fair? Your daughter needs to learn how to deal with hard situations also, and do it with wisdom, grace, and love towards others. Here is a perfect lesson for her to practice.
Then, the second thing i would do, is to talk to the mother of the neighboring girl, to inform her about the situation, and to suggest her to talk to her daughter, to help her to find out what is going on, and is there any help needed...
But, in NO WAY there need not be any condemnation, frustration, or even sadness. Both girls are preparing for a big life, and this is a working situation where moms are the best friends and also guides.
All the best to your daughter, to her neighbor-girl, and you noth, dear neighbor-moms!!!