What I would do is thus;
Make a 'canjump' boolean and set it to true upon hitting the ground, and false when up is released
Alter your code so the player can only jump if canjump is true
A) When up is pressed, start a timer so after a set time, canjump is automatically false. This will give a stronger jump whilst having a limit
The issue is if the player must make a short jump then a long jump together, the timer might interfere. What I did in my last game was as such, except
B) have a 'jumppower' number that increases by 1 every 0.1 secs whilst up is down
have it reset to 0 when on the ground and cancel the loop when up is released
if jumppower is over a set number, cancel the loop and set canjump to false