How bad is your neck injury? Are you in an actual brace or is it just a small muscle spasm? Did you get surgery done?
I would stick with your doctors recommendations. The body is all connected. Something like walking lunges don't directly work your neck muscles but any form of exercise will increase blood pressure and can cause stitches to rip.
Especially something like your neck - you need to be really careful. I personally wouldn't risk it. A couple days off from the gym will only do you good in the long run.
If it was me, I would rest my entire body. I know I would end up tensing up and engaging my neck no matter what muscle I work. Not worth further injury.