With flu and other viral illness there can be associated lymphadenopathy or enlargement of lymph nodes of the neck which can sometimes be painful. There is also associated muscle aches which can also manifest as neck pain. Usually this are not of much concern unless you have fever or any other abnormal symptoms
Next Steps
You should keep some warm water bag on the side of neck to relieve any muscle spasm. You can take some simple over the counter painkillers for short duration. Drink plenty of water and get adequate rest. If possible get yourself checked by doctor.