I really want to stop drinking soda, but I'm having vicious withdrawal headaches. How long do these last?

Several days at most. Assuming you are referring to caffeinated soda, caffeine withdrawal is a well know side effect of stopping all caffeine. The most common withdrawal symptom is a headache. Fortunately, most caffeine withdrawal headaches only last a few days at most. Some can minimize the headache by withdrawing from the caffeine more gradually. See your doctor if the headaches continue.
Caffeine. Usually caffeine withdrawal headaches will subside after a week or so. Get some no-doz or other over the counter caffeine supplement and if it cures your headaches you know it is the caffeine withdrawal. Then just reduce the caffeine gradually.