There are a few problems you might run into, but none of them are really that bad. If the mounting holes don't match up, you can always drill new ones, just make sure to get the shaft in the same location as the original motor. If the wiring is different, making mods to the harness to connect to the new engine is a simple task, just make note what each wire does on the old motor and find the corresponding wire/connection on the new one. The throttle/choke cable/s may not work with the new motor, but longer/shorter replacement cables are relatively cheap. The gas line may have to be lengthened or shortened. There are only three issues I see that could cause some head scratching and/or having to buy new parts. If the shaft diameter is the same on both motors, then your golden. However, if they are different, then you'll have to get a new pulley set for the new motor. The muffler on the new motor may not work with the old mower frame and hood. I don't know if you have the screw in muffler that is above the frame or the under frame style muffler, but you may have to buy a new muffler or improvise. And lastly that new motor may not fit under the hood of your mower.
First check to make sure the shaft diameters are the same, and if not, can you get a replacement pulley set of the correct shaft size and pulley diameters. Then try to test fit the new motor on the frame by just setting it in the correct position and see if the hood will close. Next look at the muffler location and see if it will work with the hood closed. Once you get those three issues worked out, you're well on your way to getting that new motor installed.