You need to develop a personality and lifestyle that includes interests in something else. Art, sports, music, theater, gaming, martial arts, auto racing, millions of different "outdoors" activities, stamp collecting, volunteering, sewing, trivia, building furniture, rock climbing, travel, dancing, bird watching, gardening, cooking, philosophy, history, economics.
It's a very big world out there. Get out there, look for what draws your interest, then do that thing with other people that like to do that thing. That will probably lead to new friends, unless your drinking friends have the same non-drinking interests that you develop.
I also highly recommend some therapy. Find out why you were drinking instead of doing all those other fun things.
Oh, and if you continue to drink, drink better alcohol. It costs more money and it's harder to find, and it tastes better, so you savor it and don't look to get drunk. A lot of the time now I just drink water if I can't find a drink I like. Not gonna waste my money on shitty booze that's bad for me anyway.