I think nearly every writer has had this happen to them. We’ve all seen stories that are creepily similar to what we’ve already written or were going to write, and usually they’ll come out ages after we’ve written or conceived the thing (but you’d still be the one accused of being a ripoff artist if yours was published after). The good news is that it’s very common and not indicative of you being unoriginal or secretly inspired by someone else’s work, and there’s hope if you’re stuck with a concept that bears striking resemblance to something else that’s popular.
If you’re inevitably going to be compared to another piece of media, be informed about what that other thing IS, and then make it clear in your pitching materials what sets yours apart. No need to explain it isn’t a ripoff of the other thing; best not to even mention it. Unless your book is an actual retelling of an established tale (like a modern reboot of an existing book in the public domain, or a legend/fairy tale), you don’t explicitly want your book officially tied to other media that you want to be seen as distinct from. But books being similar to other stories is inevitable, and that similarity doesn’t have to kill you. You just have to know what to do to make a case for why there’s room for yours too, and that starts with research!
As an aside . . . you can’t copyright ideas. Write them down and then the copyright belongs to you, but you can’t reserve concepts and then prevent other people from using them.