If my boyfriend is not fulfilling certain needs, how do I fill those needs within myself?

My boyfriend is not affectionate. It bothers me because I like affection. My friend has a new boyfriend and he is very affectionate and I find myself being extremely envious. I understand that it’s all my own thoughts but how do I fulfill my own needs in this area if I want physical affection from another human being?