You shouldn't be friends with a guy just so you can try to change his mind about dating you.
First of all, it's not fair to you. You'll spend so much time and energy wondering if you're making the right moves, but odds are you'll end up getting hurt again.
It's also not fair to the other guy; if you pursue this friendship with an ulterior motive in mind, he's very likely to be aware of it. At this point, you'll both be caught in the trap of having to navigate your "friendship" like it's a minefield--
you'll be trying to quietly steal his heart while
he'll be trying to withdraw to a comfortable distance without hurting you. He doesn't want that to happen either.
In the end I think it's better for everyone if you respect his decision and either accept the friendship for what it is, or spend that energy on someone who does share your goals and feelings.