A man who accelerated his car into a teenage boy outside a party has been jailed for almost two years.