I would imagine a battery replacement would be more cost effective than swapping to a brand new drive system. The $5k estimate appears to be completely hypothetical, presumably based on bill of materials alone.
Double it once because $5k is optimistic then double it again for labor.
To save you the maths, this comes out at around $18k
I may miss a joke, because 5 * 2 * 2 = 20.
So 18 give or take
You can swap any Nissan leaf with a 40kWh battery pack with a CAN-bridge, and the programming software is now open source.