Loneliness is a state of mind. When you are empty from inside, then you feel lonely. If you are full of thoughts, ideas, dreams and plans with lots of positivity then you never feel lonely. I always like my alone time and never feel lonely and I'm always with myself. If you are not with yourself only then you feel lonely.
There are times, when I was staying alone, away from home with unknown people around and their unknown language, due to education or work or circumstances. There were high chances of feeling lonely and at that time I had to struggle to cope up with alone-ness which tends to loneliness... but I adjusted myself and learned to be patient. May be my nature helped me in this as I am a bit reserved person, but in that solitude, I discovered many things about myself - Introspection. I realized, I am a thoughtful, strong and sensible person (ahem!) that I love my space and my alone time very much. You understand more about yourself. So solitude is bliss!