Your first flag was declined by the community, and your second flagged was declined by a moderator. The reason your flag was declined is because the "Not an Answer" flag isn't intended for wrong answers, it's intended for posts that don't even attempt to answer the question:
Not an answer
This was posted as an answer, but it does not attempt to answer the question. It should possibly be an edit, a comment, another question, or deleted altogether.
Primarily this flag is intended for posts such as "Thanks!" and "I'm having the same problem", neither of which attempt to answer the question. A post which actually attempts to answer the question, but is just wrong, should just be downvoted instead of flagged. One of the standard flag decline messages moderators can use actually says this too:
Flags should not be used to indicate technical inaccuracies, or an altogether wrong answer
So in this case, the system is working as intended.
As for your concerns around the answer deterring other users, I wouldn't worry about that at all. What murgatroid99 and Wondercricket said is spot on: With a 500 rep bounty, users are going to click through to your question anyway. In fact, that incorrect answer would've actually bumped your answer back to the top of the front page too, so it probably helped draw more attention to it.
Stealth edit: Something else to keep in mind is that keeping the answer there makes it clear to other users the proposed solution won't actually work. If we deleted it, then another user might just come along and post the exact same thing.