Learn to love being alone. Go do the things you've always wanted to do. Read that book, watch that movie, learn that language, learn that skill, try that new experience, whatever it is......use this "lonely" time to be productive.
I'm hardly ever lonely (or bored), and one reason is I have so many interests that engage me, keep me busy. Even this, the TMF, can achieve the same effect. Maybe try your hand writing stories, let's say, or develop your drawing, or even just creating discussion threads, or even just comments. You post it, people comment.....before you know it, you have some new online friends. Participation is half the battle.
And so applying THAT principle to real life - and going to the other side of the spectrum, away from "love being alone" - force yourself to go out. Showing up is half the battle. Whether or not it's going to a bar....or an AA meeting! lol. A ballroom dancing class.....or joining a local sports league. Your community probably has some kind of social thing going, even if it's just the local church on Sunday (if you're into that kind of thing).
Is it a "no relationship" loneliness, a "no real friends" loneliness.....or an "alone in a crowd" loneliness?!!
(tell, Dr. Internet.....lol....)