This looks correct, so i assume the question lies more in how to get the location. Depending on your game there is multiple ways to implement this. One might be better than the other in this case.
However with not knowing much else what i would do is:
In your playercontroller create a new custom event and name it. Call this in your widget, when the button is clicked. You can do that with a ‘get owning player‘ which you then cast to your custom playerController. On cast, you can now call your custom event.
In your custom event put all the logic you want to have (setactorlocatopn). To get a variable location create a new varr of vector3 in your player controller and get its value into the setactorlocation. When you want to change your location (maybe in levelblueprint?) You do a cast again similar to your widget. GetPlayerController, castToMyPlayerController, set vector3 variable.
Please note, that depending on your game, there is other ways to implement this.
Mostly talkin about multiplayer games right now.