You're making the assumption that the acceleration is constant during the process, which is unlikely. Try not to assume anything about what happens inside the material, except that all the reaction forces acting on the bullet can be averaged into a single force that slows it down.
I'll suggest...