This quote is saying that loneliness and solitude can be hard to reconcile. It suggests that at times when we feel isolated and alone, we may need solitude the most, yet it can feel like a punishment. In other words, it can feel like a cruel irony to desire companionship in order to escape loneliness, but the best solution is to take time to be alone with ourselves instead.