Lonliness is a function of not being understood , accepted and treated according to your needs. It's important to do that for yourself as much as possible first, then to find friends and relationships where acceptable amounts and preferably wonderful amounts of these features are there.
Part of that is also communicating those desires. If you communicate them but don't receive, it's either a problem with what or how you ask, or they are not equipped to give them to you. Reciprocating or initiating are other fun factors. They may better fit with someone with different needs and that's fine, but people are there who can be there for you, starting with you!