How to jump in exact distances?

I am trying to figure how to jump in exact distances before gravity is applied to pull the character back down.

Ex: I want to enter in the inspector to jump 2 meters into the air, then gravity is applied.

Also, for a bonus problem, this code helps to keep the character grounded on slopes but prevents me from jumping.

verticalSpeed = Mathf.Min (verticalSpeed, 0);

Can anyone help for a work around with this code so I can make the character jump again?

You need to use an if statement to check when your jumping and check the difference between the ground and how high you have currently jumped then run your gravity function.