Your bishop cannot control h8, so if the black king reaches the corner it is a draw. The rule: keep him out with the bishop first, then bring your king over to guard the pawn. From d2 your king is close enough, and this time it wins.