Formally, claiming to be a U.S. citizen when you are not one in order to get any government benefit (such as registering to vote) is a serious offense, which makes the alien technically deportable and can lead to N-400 being denied. In practice, experience shows that USCIS officers usually will not deny an N-400 for registering to vote, provided you have not actually voted and have a plausible explanation to the effect that you registered to vote by mistake or without understanding that you were not eligible to do so. However, you still need to disclose the fact that you did register to vote in N-400. Also, you need to contact the local election board at the place where you were registered to vote and ask them to give you a letter confirming two things:
1)That you never actually voted
and
2)That your voter registration has been cancelled and you are no longer registered to vote.
An IO will not approve the N-400 until and unless you provide such a letter, so you should get it by the time of the interview, at the latest.
As Jackolantern says, I am not aware of any cases where N-400 was approved if an alien claimed to be a U.S. citizen on an I-9, as a part of an emplyment application.