Ha! I'm good with names and bad with faces. (Seriously, though. I had two friends in High School who, for nearly a year and a half, I thought were the same person, because their names were identical and I never had them in the same class. They weren't even the same race - one was white and one was Asian.)
You must be using the word “friends” more broadly than I would -- I'm not terribly good with faces either¹, but... if I spent a non-trivial amount of time with such people, I would learn to tell them apart from their voices at the very least, and possibly from their body frames, the kinds of things they talk about, their clothing styles, etc.
I've always been bad at names. But this semester, as part of my duties as a physics teacher, I tried to learn the names of 100 students. It went alright - two months later and there are still some I have trouble with. At the start, I was a bit worried. What if I've just read to many books and things, and used up most of my abnormally small allotment of memorized names? Then wasting names on students would be a really bad idea.
But things turned out not to work that way (as might be expected from how big the human brain is, viz people with eidetic memories). I've started remembering peoples' names after just one introduction, sometimes two. And the reasonable culprit just seems to be practice. You practice learning names, you get better at doing so. Before, I made occasional conversational detours if I couldn't remember someone's name. Now, I ask them again, because I'm confident that I'll remember it without tons of further awkwardness. If I'm really having trouble, sometimes I've written down a name with a short description, and that usually cements it. Remembering names isn't the most important social skill I've learned, but it's a surprisingly dramatic one - it makes me feel closer to people, and vice versa. And it only took having to learn the names of 100 people to get started.
The lesson from this is not necessarily just about learning names, though that might be useful to you. The lesson is about how ordinary people get a lot of practice at doing things like remembering names - if you can't do something that someone else can do, practice may be an effective place to start. What seems like a property of yourself ("bad at names") may turn out to be quite mutable with the kind of practice those other people are doing.