It is just that I am not in front of a PC with UE4 installed so I cant give you an example. Sorry.
The system you have now seems very complicated. In the first test you are already calculating who is closest so this allows us to ONLY let the closest player kick.
Then we need to differentiate between the players so if player 0 presses the kick button, then player 0 should kick the ball. That is the second branch. The third branch you do not need unless the kick button does something else if not close to a ball.
As far as I see this should work. The only thing that I would suggest changing is to try to migrate this to the ball and the player classes.
If you need more help I need a bigger screenshot and a description of what is happening and why that is not what you want.