There is a bind to target the nearest enemy (Keybind/Targeting/Target nearest enemy).