Welcome to the site !!
The 03-04 should bolt up IF you use a complete system as the subframes are all slightly different , the 02 is a different mid pipe mounting location and the subframe is 10mm taller , the 05 on , are different as well and will not bolt on at all as their midpipe mounting location is on the frame itself not the subframe.... pretty much anything that fits 03 or 04 CRF450 should work (must use the header and muffler) ..... If you want a "shorter" 05 style muffler , you can unrivit the endcap and cut the muffler to match the length of the 05 (which is what I did to my 02) and reinstall the OEM endcap or Pro Moto Billet endcap (which still uses the spigot) , it makes the muffler to the endcap about 11-1/2" instead of 15" like it is stock but the "spigot" will be present 02-04 for OEM mufflers , and the 05-08 is not the same shape muffler so the "cone" endcap wont fit at all in the older can , you can find "normal" looking ones with most aftermarket mufflers/systems (FMF , etc.) but they have to be 03/04 and a complete system without welding a tab for the mid mount or changing the subframe to match the year system
Basically Aftermarket should not be a issue (03-04) as long as you use a complete system (for a aftermarket 02 system to work you need a 02 subframe or relocating the mount tab) , anything else (using OEM 02-04) you need the subframe year to match the system year