Presumably he thought of his close friend as a good person. Why else be his friend, right? And presumably when he said you should move on and find someone, he wanted you to find someone good. So then you made a good choice.
I think you’re dealing with guilt that’s not about how you feel or what you want, but about what other people might expect or what’s proper or right according to society/culture/your mother/I don’t know. Tell those voices to butt out. This is your life, this is your mourning process, and if, at this time, you get some comfort or joy or pleasure out of sleeping with a man, and if that’s what feels right to you, then that’s what’s right for you.
And if you don’t feel good, then you now know it was too soon. Wait a while before you try again. But make sure this not-good feeling is coming from you, and not everyone’s opinions.
And be kind to yourself. You walked a tough road. All my best wishes.