I don't even say that to family members. That phrase doesn't slip for me. It holds a great deal of weight and I don't toss it around, not even playfully. If I wanted to say I cared greatly, I'd say exactly that.
The fact he stressed it in text and didn't take his opportunity to backspace it, factoring in he probably re-read it a couple times...
Chances are it's not inspired by a "just a friend" mindset.
But, since some friends do say such things like they're no big deal, it leaves an opening to gauge the depth of a close friend's possible interest in something more, or even get it off their chest in an odd way.
If you react badly, he can just say it was "as a friend only" to retain some of his dignity. All the while probably mentally kicking himself.
If that is the case, then your confusion means it was at least a partial success. Think of it as an emotional contingency plan. He was vague enough to adapt safely to any reaction it gets from you.
It's hard to say for sure for a very good reason. He probably made it a point to word it so nobody but him would be truly sure of what he meant.
That might seem overly complicated but, if he puts as much weight behind those words as I do, a little plan like that is far from out of the question. My certainty completely falters in that realm of communication. I would be pulling out almost all of the cautious stops.
Note how I haven't even typed the phrase I'm referring to.
Though if he was under the influence of something, it's best ignored.