The controller has the target nearest enemy built in. Also if you’re locked on, you can use l1 or r1 to swap enemies