Question about Distance Joint 2D

I am trying to develop a game that mainly uses a form of a grapple hook, but the main key differences are that the there is always a set distance away from the player, and that they can only grapple to very specific objects on the map. My first tackle at the issue was to try and test for a collision on box colliders and then attempt a rotation on the player object, but that rotation got difficult quick.

My second attempt, and where I am asking for help, is with distance joints, they seem perfect, but my only flaw with the system is that I have yet to find a way to change the “Connected Rigid Body” or at least where I can change the connected anchor itself such that the grapple can be used again and again throughout the map.

Any help would be amazing

myObject.GetComponent<DistanceJoint2D>().connectedBody = otherObject.GetComponent<Rigidbody2D>();

, myObject.GetComponent().connectedBody = otherObject.GetComponent();