Did I cheat on my boyfriend?

Sophia • 18 | TX | 💕
I've been with my boyfriend for three and a half years. About two months ago, he went away for college and we started long distance. Ever since then I've felt so lonely and sad about it all. I obviously have guy friends but I refrain from flirting or anything of the sort. Last night, I went over to my good friends house. We were watching Narcos and playing with his dog. We always fight and kick each other around but this time it felt different. We were sitting next to each other and suddenly he tried to kiss me. I pushed him away and it didn't happen at all and I told him he couldn't do that. So I didn't cheat on him in that way but I was home alone with him. Did I cheat? I'm so confused.  Help :(