Im not very good with using godots built in function but i'd code the Area2D script somewhat like this
extends Area2D
func _on_RigidBody2D_body_enter(body):
# gets global position of rigidbody and area2D
var pos = self.get_global_position()
var bodyPos = body.get_global_position()
var target = pos - bodyPos
# since target is a vector that points to the direction of the gravity point add_force(target) will move the body towards the gravity point
body.add_force(target)
This code most likely wont work but im sure you can figure it out