You can change whether a animation loops or not by changing the loop boolean in Animation.
You can use something like this if you want to make the current animation to no longer loop (untested code):
animation_player.get_animation(animation_player.current_animation).loop = false
And something like this to turn off looping on all animations (untested code):
for animation_name in animation_player.get_animation_list():
animation_player.get_animation(animation_name).loop = false