The reason for the 5' distance is to prevent being able to contact the switching device while in contact with the water. I believe that if this is under the deck and the "reach path" distance is greater than 5' you meet that requirement but the view of your AHJ may be different. What did they say at plan review?

Quote
680.12 ...Each means shall be readily accessible and within sight from its equipment and shall be located at least 1.5 m (5 ft) horizontally from the inside walls of a pool, spa, or hot tub unless separated from the open water by a permanently installed barrier that provides a 1.5 m (5 ft) reach path or greater. This horizontal distance is to be measured from the water's edge along the shortest path required to reach the disconnect.


Greg Fretwell