Those kinds of situations are tough.
Friendships happen through having healthy connection. The one's I've had earlier in life are all not as strong, if they exist at all, as the ones I've helped create later in life. And there are times later in life when I didn't keep the goal of long term connection in mind or there have been things that have made it harder to connect that are outside my ability to change. At the same time, it's a two way street as well, and sometimes that isn't something I can do much about either.
It could be possible to strengthen weaker connections, although that requires healthy contact, and from the parties involved. Meanwhile, having involvement in activities that can bring opportunity for connection, making myself available through initiating interaction, listening, encouraging, asking questions of interest, etc., those kinds of things can bring new friendships, and seem to need to be consistent beyond just initial interactions and involvement, while trying not to force situations too quickly either. I have family, church, dance communities, various miniature hobbiest groups, and some of my business associations become friends as well.
I encountered one situation where over a few years I developed an interaction with one person, and they moved. He seemed to have mixed feelings and thoughts about making the move, and when he did, decreased his role in the interactions we were having. Over time I have continued to stay in touch through sending a text from time to time. and recently he's reciprocated when I have been able to bring up a specific topic of interest to him. Progress, except sometimes one topic isn't enough to have the connection be strong, and I can't and won't try to make him talk about other items, even though I know that would be healthier. Leaving the door open is good, and I can use the door, but if I am the only one using the door, sometimes it is wise to turn and start walking through other doors.
However, I have become better at identifying who in the social groups that I frequent can do their part in a friendship. A large quantity of folks aren't, while some of them do for awhile, but something gets in their way, and they stop. This can involve a lack of skill, yet sometimes it could be something outside my ability to influence as well. Probably the best I can do is set an example through my own actions, and get to a point where I am making enough contacts to be able to locate a few folks that have an ability to help maintain our connection over time, and let go of the situations that might not be as healthy. Staying involved in the social groups also helps by providing more contacts, and strengthening the healthier contacts through consistent contact and healthy interaction.