Flags are permanent (as Jon said in the comments) - there's no mechanism for retraction. Mistakes happen and, unlike almost everything else on this site, this particular kind of mistake is permanent.
The good news is that it's unlikely a moderator will take action on a meritless flag. (Unlikely, but not impossible.) The moderators likely will take whatever action is appropriate, though, unless it's something non-obvious. For example, if you flag something as spam when you should have used NAA, the spam flag will be declined, but the answer will probably be deleted anyway. On the other hand and to give a contrary example, if you flag something as NAA when you really should have used a custom flag to point out robo-reviewing, the mods probably won't catch that based solely on your flag.
The bad news is that your flag will get declined. If you're generally an accurate flagger, the only harm is to your pride. Many of my own declined flags were declined because I was in a hurry and clicked the wrong reason. It's frustrating, but it happens. Life goes on.