Changing the engine can be done but its a big job and not worth it IMHO.
Engine mounts, electrics, instruments will probably all need changing. Depending on the dimensions you may need a new fuselage keel tube too (if the 582 needs a longer one - I'm not sure about tht).
Completing the above tasks will just about get you through the hoops.
You will have to negotiate the hoops of fire to get the paperwork issues resolved for a change of engine type. Not impossible but daunting.