None of your glands are swollen, and your doctor told you that you had a bad muscle spasm. Don't you believe your doctor?
But what did your doctor say to do about it?
Welcome to the world of Sternocleidomastoid spasm.
This is the muscle that goes from the sternum, and your collarbone(cleido, or chest), to the bony spot behind your ear (the mastoid). Thus the name. And its location is exactly as you described.
Interestingly enough, you SHOULD have been told how to stretch that muscle, and when it's tight, you'll have difficulty doing it. You turn your head to the side as though you were looking over your shoulder, then you tilt the head upwards. I've started the website listing with the cyberpt (Cyber Physical Therapy), that shows a video of the stretch. As you do it, if you have difficulty, you'll know the direction to put emphasis on to get full stretch.
And then, after showing you I know the issue, I give you several sites that tell about it and its complexity, and problems associated with it. It goes far beyond "sore neck". it can even cause one eye to be making a lot of tears, or cause balance problems, or even difficulty swallowing.