Flatest route would be west entrance up to I90 East though that adds a lot of miles. Depending on where you are staying though also has a lot of thought because you could have some steep grades just getting to one of the entrances.
Going out the East entrance to Cody has a climb but not really that bad as you are going slower anyhow. Once you get out then you have to decide your next step. 14 is the worst, 16 is better but still a steep pull over the Big Horns. You can avoid them though by adding a number of miles and going down through Casper. Had to take this route in 2000 because the wild fires closed all west/northwest routes out of Custer. It was a pleasant drive with our gasser and 30' TT.