So I've read an adaptation of this book along with a couple more from the same series in a different language, but the writer there didn't reveal the original title.
Four kids are the main protagonists of the series.
They live in a city where strange things happen all the time, and everyone is kind of used to it.
In this story they face shape shifting jelly monsters, and later rock monsters.
They find out about an ancient civilization underneath their city, where a war had been going on between androids and rock monsters (the androids are the good guys)
The leader of the androids is an immortal human.
This leader blows the whole place up to stop the rock monsters.
The final twist is that one of the kids were replaced by a jelly monster.
They kill the said jelly monster with the help of an android, who they didn't know was an android.
The story in brief:
Two kids go to a forest, one of them is kidnapped by this jelly monster. The other one comes back to the city and asks his the friends to come and save him. They find him standing in the forest. He acts strange, and denies the story of the jelly monster. Later they find out that it was actually a jelly monster in their friend's form, and they burn it to death. They go back to the forest to see if there are more of the monsters. They go in a cave and end up in front of a big city. Here another one of them is taken by a jelly monster.
They go towards the city, and face a rock monster on the way. A strange girl saves them from the monster. She explains to them that their race is at way with the rock monsters. She wants to take them in the city. Then they see their friend who was taken last. They're suspicious of him, but the strange girl tells them that she'd be able to tell if he's human or not once they're in the city.
She takes them to the main building in the city where a mysterious doctor lives (who's the top guy in their society). Here they find their friend who went missing first. The doctor tells them that he created the jelly monsters to clone humans and fight in the war. He's immortal, and the only human in the city. They're losing the war, so he wants to blow up the whole place and destroy both races do that the rock monsters can't escape to the surface. He tells them to return to the surface through a secret tunnel. They take the strange girl with them.
After they return to the surface, one of them turns out to be a jelly monster. The first jelly monster cloned him before dying. The strange girl kills this jelly monster, but dies in the process. It is revealed that she, along with the whole race in the city were androids created by the Doctor.
This book is probably a part of a series. In this series the kids live in a city where supernatural, paranormal and weird events happen in a regular basis. The mayor of the city is a witch. Topics of the series include aliens, time travel, alternate reality etc.
It's most probably in English. Written in the last century if that helps.