You get the direction of the Z-Vector of any Spatial with: (This is a Vector3)
If you want to ignore the y-component of that Vector you could use:
I assume that you currently use a KinematicBody. If you really want to use Forces and Physics you could use a RigidBody instead. But I'm unsure if you really want that as it probably implies a completely different Behaviour of the "player".
Anyway just to have it said, you would go like this to move the player forward (as a RigidBody):
_process(delta): #could also make sense inside integrate_forces
#maybe you have to multiply the vector by -1 if forward and backward is changed
apply_impulse(Vector3(0,0,0),global_transform.basis.z * forward_force * delta)