Remove the door from its hinges by tapping a screwdriver up through the hinges to drive the pins out. Lay it flat on a pair of sawhorses.
Remove the old lock, if it is still installed. Remove the four corner screws from the plate on either side of the door and pry the plates away gently with a flat screwdriver blade. Remove the set screw under the edge of the inside handle and pull both knobs from the door. Remove the two screws from the door's edge and pry the lock out with a small screwdriver.
Measure the mortise hole from top to bottom and front to back with a tape measure. Insert the tape into the door to measure the depth to the back of the mortise as well. Write these dimensions down. You will be creating a filler block to fit them.
Cut a piece of lumber to the dimensions you took from the mortise. Use a table table saw to make the cuts. Cut the lumber to the correct thickness, then height. Make the final cut to the depth of the mortise on a miter or chop saw.
Check the size of the block by sliding it into the empty mortise. It should be snug, but fit without forcing. Pry the block out gently and apply glue to the two large faces, reinsert the block in the door and drive a 1-inch finish nail through the face of the door to hold the block in place.
Allow the glue to set overnight. Fill the smaller holes in the door's face with solvent-based wood filler, using a flexible putty knife. Allow it to harden completely, following label instructions for best results. Sand the door smooth once the glue is dry.