Group dynamics are funny and people are illogical sometimes.
When I worked with vulnerable people, it was part of our training to realise that a person may not want to work with me because I am white, female, young or old, married or unmarried, drive or walk, look this way or that, come from here or there - anything may make them turn towards me or away from me, and that is their right. I got really used to it.
I have the same rights apparently, and I recently made an overture towards a new friend and made arrangements to meet, only to think during the time together 'hmm I am not sure about this' and probably won't do it again. My reasons are my reasons, and when it happens to me, I have to think 'their reasons are their reasons.'
Once I wasn't invited to a day out only to find they all wanted to take magic mushrooms and I didn't do that. It hurt at the time but time has shown that those people are not my people and I went on to make other friends.
I think all we can do is surf the waves as they come to us. Maybe your friend of 20 years is just different now - did you suspect that at all? I am sorry you are hurt. It's not you, it's just life. I would work on accepting her right to float off from you. You didn't see it coming but I bet you can see some reasons now. And the wider group let that happen because maybe you didn't fit them, maybe you reminded them of something - let's say they all drink and you're toning it down as you get older, they aren't going to want you around talking about being healthy etc. They are going to be happier if you're not there. Or say they bitch and you don't, they are going to want to do that and not feel bad about it. There must be something they like or want that you don't naturally do, and they have chosen to carry on without you down that path. You are not wrong. You MUST be yourself and people DO get to choose whether you are their flavour or not, as do you. Time is limited and we all have that right.
Can you think of anything that led to the parting of ways, some way she was moving and you were not moving the same way?