A coach response here, NOT a Dr. or a trainer or a therapist!! You aren't very specific as to the pain. In the neck leaves a lot of territory for speculation.
I suspect it MAY be form since a well executed shot should NOT strain anything in the neck. Ideally the only use of the neck/neck muscles, while shooting, is to hold the head up; NOT to draw the bow.
I will agree with Sam, see a real Doctor, one that specializes in sports injury.
Post a video of how you shoot and let us take a look at what you are doing. Video AFTER the pain has subsided, and before it flairs up again. AND, don't shoot so long that you get the pain back.
Arne