you got it, its definately a kingsnake.
You don't need anything like a 'naturalistic' habitat for him if you are only keeping him for a week...BUT if you want to make him feel more comfortable I would suggest sand or wood chips as a bedding, a small water bowl big enough for him to get in, a box cut down low (about 2X his height or if he's very small say 3" tall) with a hole cut in 1 or 2 sides of it, this will act as his hide box which is a cramped dark 'safe' place for him to hide. Temp should be safe at 80- 85 degrees on one side (one side should be hotter one should be colder so hot side would be about 80 85 and otherside should be atleast 5-10 degrees cooler - if you don't have an underside heater use a light (wattage depends on size of cage and airflow/location so just keep an eye on temps)
honestly keeping him captive for a week will be stressful - I would doubt he'd eat but kingsnakes are known to be very adaptable and easily tamed to captive situations more so than other wild species to my knowledge... lizards, frogs, snakes, and mice are what kingsnakes usually eat in the wild.
I must warn you if he gets too cold and/or too stressed out he's liable to get sick and die...Snakes are hard to tell the signs of stress on until you find them dead one day
so I want to warn you if he gets unduly stressed (and could be nothing you actually did other than him not being a good canidate for even short term captivity) he could die on you in the week you plan to keep him.
If he travels around the cage alot back and forth up and down and around for more than a couple hours in one time, or is exceptionally active/agitated off and on often in a single day I would suggest you go ahead and release him as he is showing signs of stress and may just wind up stressing himself to death by the excessive energy usage and strain.
Good luck with him and I hope you learn something from him and he gets released whole and healthy!