I sympathise, OP, and I'm being honest in my post, so please don't interpret it as mean - I think honesty is best here.
I'm sure you're a lovely person, but please don't tell people you're lonely or miserable. It's not very nice, but it's human nature to think 'Why?'. It's a sad fact that, just as people who have lots of money tend to find it easier to make more, people with lots of friends seem to be more successful in making new ones. Of course, once you've made a good friend on a deeper level, then you can be more honest about these feelings - but don't whinge at them for too long.
I think of myself as a nice person - kind and sympathetic and never deliberately nasty (have put my big foot in it sometimes). I make an effort with shy people; I'm shy myself but was brought up to understand that's not really allowed once you're an adult, so some people even think I'm an extrovert! Hilarious! If you're shy, you have to (cliche alert) 'fake it till you make it'.
Another point which I know sounds unhelpful is that -even as the kind person I try to be, and hope I am, I still like my friends to have a bit of....'edge' is the only way I can define it. If someone is nice, bland, saccharine or anodyne, of course I'll be nice back and happy to join them in group activities, but I wouldn't seek them out as a friend. I like a bit of character, a bit of bite...it's really hard to define. So I would say, be nice, but don't hide your personality to please others. I'm pretty opinionated about say, books, films, music, TV shows - and sometimes I disagree with my mates - and that's fine - that's what makes relationships interesting, in my opinion. There's no fun in a 'yes' person.
I think most relationships start, and thrive long-term, on making each other laugh. This goes for friendships and marriages/partnerships. So try having a laugh with people as a start. Some people see life as one long laugh but even if you're an introvert who gets down sometimes (like most of us - and most professional comedians, actually) then teach yourself to see the funny side of things. People tend to respond to that - because they know you'll be a fun and exciting companion. Don't start with the deep philosophical stuff - that would put me off, and I'm given to that sort of musing myself.
Hope some of this helps and good luck.