First, only a moving kinematic body (with
move) will collide, the non moving will never detect because kinematics normally never detect collisions.
So, in the player code you may have:
if is_colliding(): #only collides after move
var collider = get_collider()
Later you may want some processing before deleting instead of removing it from the player code (is better to let an instance to take care of its own death), like remove collisions, play sounds, change sprites, animations, fire particles and make that node
queue_free itself after finishing all that fancy dying process.
Every body in the group that can be killed by the player should have a common function to call and do all that (like die, hurt, etc.).