2002 rubicon transmisson problem

I have a 2002 rubicon 500 with a bad trasmission. it will not do anything when you try and put it in gear. I have done everything that everyone has recommend and some. If i put is in gear and spin the tire, I can hear it grinding inside. So I am trying to figure out what is he best option, I would like to swap the motor or at least the bottom end out. it still runs good. I have a guy that has a 2004 450 rancher motor for sale for 500.00. I just dont know if it can be swapped. so I guess my question is will 2004 450 bottom end work in 2002 500? any help would be awesome

2002 rubicon transmisson problem

I have a 2002 rubicon 500 with a bad trasmission. it will not do anything when you try and put it in gear. I have done everything that everyone has recommend and some. If i put is in gear and spin the tire, I can hear it grinding inside. So I am trying to figure out what is he best option, I would like to swap the motor or at least the bottom end out. it still runs good. I have a guy that has a 2004 450 rancher motor for sale for 500.00. I just dont know if it can be swapped. so I guess my question is will 2004 450 bottom end work in 2002 500? any help would be awesome