You need to separate the idea of loneliness from the idea of being alone.
Loneliness is the negative emotion you feel when you are disconnected from others. Being alone is merely not being in the physical presence of others.
You can be lonely in a room full of people you call friends. You can also feel connected to every other living soul while still being completely by yourself.