How can I get the actor location from an actor in another class?

I want to make a system where my character would teleport to another actor’s location. So far, almost all of my attempts have involved this

LedgeRLocation = &ALedgeR::GetActorLocation();

However, it always has the same error: “a nonstatic member reference must be relative to a specific object”. I doubt this has anything to do with the way I’m trying to teleport the character because I get the same error no matter where I use it within the character class. Can someone let me know how to do this properly?

ALedgeR is not a spawned actor in the scene but a class type

ALedgeR* MyLedgeActor = World->Spawn....
...
FVector Location = MyLedgeActor->GetActorLocation()

I tried to access the location variable in my character class, but I got the same error.

Also, is there a way to make it so that the character gets the location of the nearest LedgeR actor? I know that this isn’t part of the initial question, but as my game grows and I add more LedgeRs in more levels, I’m afraid that this method would get tedious and/or unorganized.