Lions being depicted as majesty and brave creatures has dated back to Mesopotamian cultures. Many entrances for cities and sacred sites had lions in front of them, and many other cultures did the same like Mycenae in Greece, and Bogazkoy in Turkey.
"King of the Jungle" might have either originated from ancient India. The word "jungle" comes from the Hindu word "jangala", that refers (referred?) to any location that's not inhabited by humans. However, before being called "King of Jungle", they were called "Kings of The Beasts".
If you count when lions began being associated with kingliness, then it began all the way in the times of the first civilizations.
If you count "King Of The Beasts/Animals", but not the above, then at least around the 6th century BC with Aesop's fables, which depicted lions as kings.
JUNGLE is a word in Hindi meaning "not an inhabited place". The word covers forest, wilderness, wold, waste, even the world (without human structures). The emphasis is on emptiness. Much of what is called jungle in India is steppe or nearly desert.