It's interesting to note that, according to original intention, a parsec not being the correct unit of measurement was the point. The published movie script suggests that Han is just making stuff up to wow what he sees as two ignorant locals, so he doesn't care if it's accurate as long as it sounds impressive (which would make his insistence in TFA on the twelve parsecs thing funny if this was the case: "these may be made-up facts, but they're MY made-up facts and dang it you're going to get them right!"). The script even says something like "Ben reacts to Han's attempt to impress them with obvious misinformation" in its directions.
This intention, however, wasn't well understood from the final movie. So we have works in both continuities (Rebel Dawn, third novel of A. C. Crispin's Han Solo trilogy; and the movie Solo) making a point of explaining and justifying how that could actually work: in the explanation that I remember better (the novel one), the Kessel Run goes through the middle of an improbable cluster of black holes, and Han sheered dangerously close to them on one run and in taking that risk managed to achieve it in a shorter distance because of how the black holes warped the space around them.