Try not to diagnose him with anything.
If you keep offering friendship and it keeps being denied, then he doesn't want it. I don't know what level of schooling you're in, but perhaps he just wants to focus on school and has friends and family that he spends time with who do not attend that school.
Unless he was to tell you, there's really no way at all to know why he doesn't engage with anyone. It could be too much anxiety, or it could just be his preference.
If you want to keep reoffering friendship to him, that's fine, but he might never choose to reciprocate it.