17 Now the king had put the officer on whose arm he leaned in charge of the gate, and the people trampled him in the gateway, and he died, just as the man of God had foretold when the king came down to his house.

Read 2 Kings 7:17 Using Other Translations

And the king appointed the lord on whose hand he leaned to have the charge of the gate: and the people trode upon him in the gate, and he died, as the man of God had said, who spake when the king came down to him.
Now the king had appointed the captain on whose hand he leaned to have charge of the gate. And the people trampled him in the gate, so that he died, as the man of God had said when the king came down to him.
The king appointed his officer to control the traffic at the gate, but he was knocked down and trampled to death as the people rushed out. So everything happened exactly as the man of God had predicted when the king came to his house.