If elephants are continued to be killed and hunted then elephants could become extinct is as little as 10 years to 20 years.
However as long as the elephants are protected which I hope they are then elephants may not become extinct for at least 40 to 50 years or at all.
Elephants will continue to hopefully reproduce so as long as the elephants are reproducing often enough before they are killed or hunted then we may never see elephants go extinct.
There's no way to know for sure when exactly elephants could become extinct but as of now it's unlikely elephants would become extinct anytime soon.
But there is a possibility that the elephants could become extinct within 10 to 20 years.