NO! They are different firmwares for those 2 year models. It'd be better to just load the Race ECM mappings onto your current ECM AFTER saving a copy of it for back-up. Do not physically take an '06 ECM and plug it into an '04 Bike!
2006 = DDFI2 fuel injection
2004 = DDFI fuel injection