Ugh god, OP. These situations suck, and I think it's fair and valid to just accept that they suck. There's no other way around it.
It's like... you are into someone... you think it's going so well, you start "envisioning" (lol) a future with them... you get closer, intimate, vulnerable - and then the sinking feeling happens. You just know that they are about to end it, but you don't understand why. The radio silence continues just long enough for you to torture yourself with how you possibly turned them off. Then you start trying to find traits you didn't like about them, to prepare yourself ahead of time for the feeling of rejection. Then, just as you think you'll be able to drop it in peace and never hear from them again, they write an infuriatingly semi-kind message, rejecting you. Which makes you think maybe they're actually really decent, which makes the rejection worse.
Of course you feel like a deflated balloon. Dating is an emotional rollercoaster. It's happened to me more times than I can even count.
What I tell myself now is that if something is compatible, it will just stick, and that will be it. There won't be all of the dancing around and neurotic over-thinking and stressing. It will just work itself out pretty easily. Therefore, if someone rejects me, they've done me a solid, because it's leaving my life open for more good stuff that actually works for me (whether single or in a relationship - doesn't matter).
For what it's worth, putting bits of what you've said together, it sounds like me like he wanted to put a wall up, because he wasn't confident about himself in relation to you. He wanted some company and attention and excitement, but isn't ready for a relationship/sex/dating/intimacy at the level he thinks he'd need to be at to be in a relationship with you.
I actually dated someone I felt this way about earlier this year. I was really deeply attracted to her, but she was way more accomplished, wealthy, well-travelled, and "together" than I am. I felt like a child in comparison to her, and I felt like I couldn't keep up if we'd gotten together. Either way, it didn't change my feelings for her. But it did make me feel that we were incompatible, and I couldn't picture us being in an actual relationship.
So I'd say he wants it on his terms, yes. He'd rather have you around than not have you around, but he doesn't want you to expect anything at all from him. He's communicating in various ways that he's emotionally unavailable - to you, or in general. He would feel more comfortable with someone he feels is at his "level" - whatever that might be. It's an unconscious feeling and is not necessarily anything to do with attraction towards you, but more to do with his feelings about himself in relation to you.