The animal that is actually king of the jungle is the lion.
Although the lion does not actually live in the jungle and the phrase king of the jungle when referring to lions is just a cultural metaphor, which mainly refers to the lion's majestic presence as well as strength and the lions role as an apex predator.
Tigers are also powerful and and more solitary hunters than lions and don't usually live in social groups like lions though.
And the term jungle in the context of lions is just often referring to the wilderness or savanna, where lions are found.
The lion has also been associated with bravery, leadership and royalty for centuries which lead to the lion getting the title "king".
Lions however instead live primarily in grasslands and savannas and not jungles.
Lions also live in a social structure known as prides, in which multiple lionesses hunt and raise their young and the male lion protects the lionesses and their young and protects their pride as well.
Tigers don't have the same structure as lions and are solitary hunters.
Basically a lion is seen as the king of the jungle, because the lion commands respects from other animals and has a strong presence.