I can't envision a front brake bolt being TOO LONG (okay, there is the exception if you are retrofitting an OLDER brake caliper), but if that is truly the case then the EASIEST solution is to add a "washer"/spacer ("locking" OR plain OR both) to bump the front brake caliper away from the front of your fork.
Don't trade your longer bolt for a shorter one! SAVE your long(er) recessed nut(s) in your tool box [I have at least three different lengths] ... the longer recessed nuts used to cost $7.00US a half dozen years ago (i.e., MORE than a normal recessed bolt costs).
The longest recessed nuts can generally be used to mount a rear caliper as a front brake (not an ideal installation, but useable).