How to set character jump height

I have a empty game project(C++). I have also converted character c++ to blueprint pawn…But I am confused how I set up jump height of pawn.

If I keep the space button pressed. Its keep on going up and up

The height can be adjusted through “Jump ZVelocity”, and there is already an answered post about that issue.
Now, if your player keeps getting up you need to configure a “Stop Jumping” when your jump key is released, and set a Jump Max Hold Time when your jump key is pressed. That should solve all your problems.