Welcome to the forum.
Great job of you to attempt to give up diet soft drinks! If you're trying to quit cold turkey you may be experiencing severe aspartame and caffeine withdrawal when you get migraines. You also don't need to give them up completely, reduced consumption is just as good. You're only in danger if you consume a ton of it quickly and regularly. A friend of mine had a brain aneurysm once from drinking the big 2 L bottles of Diet Coke constantly. He survived but it took a much longer time to wean himself off. You're likely not in that boat. One or two cans a week won't kill you, and you can look forward to it as a treat.
I started having them when I reduced consumption as well. Aspartame is a terrible chemical that metabolizes into the same compounds as formaldehyde, so it can linger in your system as you try to detox. If you keep at it you can expect the headaches to last a couple of weeks to a month.
Quitting cold turkey can trigger the headaches as it shocks your system with this sudden lack of the chemical, especially if you drink lots of it. To start, try diluting a can of it with a half or full can of water, like it's soup, when you drink one, and sip not chug. This can make you stop drinking before it's all gone and limit your spontaneous consumption while you still get the soft drink taste. Increase the water ratio gradually.
There are also several caffeine-free carbonated clear water beverages you can find in the same aisle as pop. They come in flavours like tangerine-lime, black cherry, peach. The non-sugared ones are sweetened with sucralose, so they may provide a better alternative while you wean yourself off the pop. Just don't get addicted to them either

Perrier and other carbonated unflavoured water is excellent.
When you go out to bars or pubs, ask for one diet pop and a glass of water. Sip the diet pop and keep chugging and refilling the water. You save money, consume less chemical, and can still enjoy a social drink beyond water with friends.
Also be sure to exercise regularly while you're detoxing. Over extended time big diet pop drinkers can trick their brains into believing aspartame is real sugar because it was just a substitution, and it will begin to convert it to fat you'll need to burn off.
Ultimately all carbonated soft drinks are something everyone can do without, so good on you for doing it.