The vast, vast majority of people do not have bags of self-confidence. That's normal, more survival instinct than anything.
It's uncomfortable to go up to a stranger and talk to them but it's not impossible. The reason the advice 'just do it' is often given is because that's the simplest and most pure advice you can give. There's no panacea for this situation, you just have to take a leap. The people who reject this advice and find excuses (e.g. no self-confidence) really probably don't hate being lonely so much as they would talking to a stranger.
That sounds like some kinda Christian drug rave
Nice...