I have had this before and I saw a chiropractor and he did an adjustment and it went away. It is back now and I will have to go to another chiropractor and see if it will help again.
Hello and hope you are doing well.
The pain could be due to enlarged lymph node/nodes. Lymph are protective mechanisms of the body and they 'trap' the infecting source causing enlargement of lymph nodes. The infection can be from the ear. The pain could also be due to mastoiditis, which is infection of the bone behind the ear. This happens when there is a middle ear infection, which spreads to involve the mastoid bone. Check to see if there is local rash which could also cause pain. As the pain is persistent, please consult your primary care physician for an evaluation.
Hope this helped and do keep us posted.