Ouch. I’m afraid you’re stuck in the friend zone. On the plus side, he told you in the nicest way possible. I don’t think there’s any coming back from “I’m flattered, but no thanks.” I don’t want to say it’ll never happen, because plenty of friends do suddenly realize that they are perfect for each other (particularly in Patrick Dempsey movies), but it doesn’t sound promising. “I’m not looking for a relationship right now” is just a polite way of saying he doesn’t want to date you. Because you guys could just date and not be serious, and he’s not even interested in that. It’s rough, I know, but there are other guys out there.
The thing is, he probably had at least an inkling of your feelings for him before you confessed. If he hadn’t already made a move to be more than friends, it probably wasn’t going to happen. At least now you know for sure.
So can you remain friends with him? He seems like a good guy. It will be tough, for sure. In a way, it would have been easier if he was a jerk about it. Now his nice rejection may make you want him more. Some time away from him might make things easier. Once you meet someone else, you can resume your friendship.
At the very least, your confession didn’t ruin the friendship. He was moved by your feelings, but he wants to be single. Dating you, someone who he already knows well, could lead to a serious relationship and that’s not what he’s looking for. Think of it that way–even if it isn’t completely the truth–and be happy that he’s in your life as a friend.