There is a difference between being alone and being lonely. You can be in a crowd of people at
Grand Central Station and still feel lonely. You might use the word alone when you describe the situation: "I feel so alone." However, you're in Grand Central freaking Station. You're not alone. You're lonely.
Maybe your job sent you on a trip to a foreign country. You're in a comfortable hotel, and just down stairs there's a lobby and a bar and a restaurant.. Maybe you're in a major metropolitan area. A real tourist trap with hundreds of thousands of people within spitting distance from your window. However, your spouse and your kids and your family and your friends and everyone you hold dear is on the other side of the ocean, or maybe the whole planet. You might be alone in your hotel room, but you're not alone in the world. You may however, feel lonely.
You can also be the only person in your house, and you haven't been with anyone notable for awhile and you don't plan to be with anyone notable for the forseeable future. Maybe it doesn't bother you. Maybe you meant for this to happen. Maybe you need to work on a project of some sort and need no distractions so you can concentrate. Maybe you're going to write that novel you've been meaning to write all your life. Maybe you need to do your taxes. Doesn't matter. The point is, you're alone and it doesn't bother you at all. You chose to be alone. You're comfortable with yourself and who you are. You're alone but you're not lonely.
It's uncomfortable to be lonely, but if you're not alone you can usually do something about it. If you're alone but not lonely, there's no problem at all, is there? The thing to avoid is being alone and lonely at the same time. That is perhaps the greatest trap to anything living.