Sorry to hear that you have a sore neck and that there is a lump in your neck that is tender. I recommend that you get evaluated by an otolaryngologist
(ENT aka ears nose throat physician) for your neck lump. You are correct in saying that sometimes a lump in the neck can be from a lymph node, but there are many other possible etiologies that can cause a painful lump. In addition, even if it is a lymph node, if it is so painful that you cannot sleep on that side, I think it warrants an evaluation by a physician. There are hundreds of lymph nodes in your neck, but not many in the midline actually (unless they are very low in the midline neck in what is called level 6), which makes me think that it may not even be a lymph node. The thyroid gland has a midline section called the isthmus of the thyroid gland which can potentially have nodules or other inflammatory processes that can cause pain as an example of a different cause for the neck pain. An ENT will be able to take a thorough history and do a focused head and neck exam to better help figure out what may be causing the lump and pain in your neck. I hope this helps.