The right time to marry is when you find someone you are happy with, compatible with, and love. Not when you decide your marriage partner should "fix" your social issues, or because you feel you "have to" marry someone at some time. Age, career, success does not indicate whether or not you should marry…
To expect a spouse to fix your social situation and your loneliness places a huge burden on someone else. A burden that is yours to fix, not theirs. Instead of focusing on a spouse/marriage, focus on making friends, expanding interests and social options. Making friends and expanding/creating a social circle will improve your chances of finding the right person for you..