A firm NO, and ignore him. While it isn't sexual all the time, it can be dominance. Regardless of intent, no one wants a dog humping them. So try to say NO before he actually starts to hump, then walk off. He can understand that humping gets him ignored. Putting him in time out he probably doesn't understand.
Work on commands. at this age he should know sit, down, and needs to work on "leave it." Giving him training will keep his mind busy and help him see you as not a humping item.