I recently posted a question that turned out to be a duplicate, but already had multiple answers. I wanted to delete it, but I couldn't. I kept getting downvotes, ruining my reputation. I can't do anything about it. Is there a way to close voting?
According to the help center, you can vote to close your own questions once you have 250 reputation, and you can vote to close any question once you have 3000 reputation. If you don't have that much reputation but have at least 15 reputation, you can flag your question for closure, which will send it to a review queue where users with enough reputation can vote to close it. To do so, click the "flag" link under the question, choose "should be closed" and then choose the reason why you think your question should be closed.
However, in your question, you say that the question "turned out to be a duplicate". I suppose that you mean that it's marked as a duplicate, which means that it's already closed. If that's the case, there's nothing more you need to do. It can also happen that it's not closed yet, but someone flagged it. In that case, you will have a banner on the top of your question with two buttons, "this solved my problem" and "my question is different". If you click "this solved my problem", your question will be immediately closed, and if you click "my question is different", it will allow you to edit your question to explain why it's not a duplicate. In this case, I suppose you would want to click "this solved my problem".
Also, you seem worried about the downvotes ruining your reputation. Closing a question only prevents new answers to that question, it doesn't prevent downvotes. The only questions that can't be downvoted are deleted locked questions, and only moderators can lock questions. If you think a question should be locked and you have at least 15 reputation, you can flag it for moderator attention by clicking on the "flag" button below your question and choosing "in need of moderator intervention" and typing a custom message to the moderators. However, posts are only locked in rare cases, and I doubt that your question is one that should be locked, so I don't suggest asking a moderator to lock it, otherwise your flag will probably be declined. For more information about how closed and locked posts work, I suggest reading What is a "closed", "on hold", or "duplicate" question? and What is a "locked" post?.
If you're worried about your reputation and can't delete your question, the best thing to do would be to edit the question to turn it into a good question. You can read the "how to ask" page in the help center on the site you've asked the question on for tips about how to ask a good question. You can access the help center from the "?" icon in the top bar. Once you've turned it into a good question, it will hopefully get upvotes which will compensate for the reputation you lost from downvotes.
If you've read the help center and you don't think you can edit your question into a good question, you can also get the post dissociated from your account as described here. If a post gets dissociated from your account, your name will be removed from the post, no further votes on the post will affect your reputation (neither upvotes nor downvotes), you will lose all the reputation you've earned from upvotes on that post and you will get back all the reputation you lost from downvotes on that post. However, you shouldn't do that too often. The only way to get a post dissociated from your account is to have a Stack Exchange employee do it, and if they notice that you're abusing that feature to be able to ask bad questions without losing any reputation, they might delete your account. It's OK to get a post dissociated from your account once or twice when you really regret posting something, but you shouldn't do that systematically every time you get downvoted.
There's no way for a user to lock voting on their question. That would be ripe for abuse.
You'd have to get a lot of downvotes to "ruin" your reputation though. 5 downvotes will cost you only 10 rep, and that amount can entirely be recovered by a single upvote on an answer of yours. Don't sweat it. It's peanuts.
And besides, the point of the downvotes was (, likely, in this case) to point out that you did insufficient research. In the future, just think back and make sure you've covered all your bases before posting and this won't be a problem.