Is it ok, if I get inspiration from the main story, but change the names of characters, and also change some of the final suspense mystery and its cause, while still keeping the overall theme?
Yes, just make it super clear where your inspiration is comming from so we understand better your take on the story