Those brake stud nuts are often specific to the model of bike frame and fork you're fitting them on. The manufacturer supplies a generic length like that in the pic - (front and rear are very often different lengths too) but it's not uncommon to need a longer sleeve version than the "standard" for your front fork fitment. I've a bunch of them in various lengths in the parts box - anywhere from about 10 mm up to over 20mm. They are sometimes subtly different diameters with the raised lip section at the head which can be a problem fitting them in the fork hole.
It's important to get the *right* one for your fork mount, so you have sufficient thread engagement on the stud, and can still correctly tighten the brake calliper to the fork.
Any half decent LBS will have loads of them in all the various permutations. Cheap as chips, or should be. I've got alloy, chromed steel, stainless steel, hex head, Torx head, etc etc.