Fork Swap on a bike requires a different hub. This is step one in the process once the wheel has been removed, tire removed, and rotor removed in advance.
Be sure you know what you're doing before you start doing this if you're trying to save money. Taking your bike to a good shop to do the work will always be the best option in the end.
Have fun and learn something!!