If I have marked any question for close by mistake and it shouldn't be closed, then how can I remove the close vote of mine from that question?
Because many people wished to be able to retract a close vote this feature was introduced recently:
To undo a close vote we have to click on "close" again to see the following window:
Note that in case we had selected "Retract Close Vote" there we will not be able to vote to close on this question again or later, even if it was edited for bad.
This obviously can not be done for a moderator flag we had issued.
You can't retract flags.
A moderator will see it and likely disagree with it. Assuming that happens that will count against your helpful flag totals but that's rather the point: don't flag things willy-nilly.
I should point out that having declined flags is not the end of the world. Everybody who gets involved in flagging has a few so don't take it as a slap in the face. Just learn from the situation.