I'm assuming that you are making a 2D game and using a Kinematic Body node as player, if that is the case then here is an example of how I implement jump mechanics I hope it helps :)
var VELOCITY = Vector2()
var SPEED = 400
var GRAVITY = 550
var JUMP_FORCE = 500
func _physics_process(delta):
VELOCITY.y += GRAVITY * delta
get_input()
VELOCITY = move_and_slide(VELOCITY, Vector2(0, -1))
func get_input():
VELOCITY.x = 0
if Input.is_action_pressed("ui_right"):
VELOCITY.x += SPEED
if Input.is_action_pressed("ui_left"):
VELOCITY.x -= SPEED
if is_on_floor() and Input.is_action_just_pressed("ui_up"):
VELOCITY.y -= JUMP_FORCE