What can I do about swollen, hard, tender lymph nodes in my neck that do not move?

See E N T doctor. See ENT doctor a s a p. Do not delay. Let him/her examine you and advise.
How long? How long have you have those nodes? If they are recent and occured with an infection, they will resolve on their own, if they have been there for a while, they need to be checked by your doctor.