SRAM Maxle Compatibility
If there was no published information about this fork, we would first observe the potential replacement is longer but has the same threaded length. Therefore it is possible to construct a scenario where, say if the current axle fit exactly flush and the dropout had 9mm of threads, that you would need to use a washer to keep the new one from bottoming against the threads and not the axle shoulder as it should. So what would you do is use the depth gauge on a vernier caliper to measure the distance between the two outer faces of the dropouts and also the threaded length of the fork, then do the math against the specs of the replacement or other available replacements.
The above is what you go through when matching a Maxle on to whatever random fork to see if it can be a suitable replacement. But because yours is a Rock Shox, you can figure it out easily by looking up the axle in the SRAM/Rock Shox spare parts manuals. SRAM has arrayed their thru axle lineup such that there's only one choice per axle spacing, so yes, it will work.