Use this metod(.animation metod), for example:
$anim.animation = "Idle"
So, this code example can be usefull for you:
func _process(delta): # USE THE FUNCTION YOU LIKE
if !is_grounded:
$anim.animation = "Jump"
elif velocity.x != 0:
$anim.animation = "Run"
I hope it works for you! =)