The easiest approach is a work energy approach:
EBefore + WNC = Eafter The mechanical energies are EK,Egrav,pot.,Espr and the only work is the negative work of friction: -Ffd. Because the system has no motion initially or after it stops, Ekin = 0. Since, there is no change in height, EP = 0, and there is no spring potential after the mass is launched. The equation becomes
Espr or 1/2kx2 = Ffd (Granted, we could have gone directly to this equation in that we had spring energy that went into frictional losses.
d = kx2/(2Ff ) Everything is in MKS, so just plug in, although it's always a good idea to track the units.