Yes it's kind of random, the stats are gradually added up to level 100. I'd suggest getting as many EVs as you can, then some of them will definitely be added before level 20.
The other way is to breed it 10+ times, save your game, and test each one with rare candies (you could use EXP share against a high-level pokemon too). If you don't get Hitmontop, reset and try a different one.