Welcome to the site !!
As far as I know All years from 2002 on will fit (front wheel only) , I believe to put a R rear on a X you can go from 02- 12 , then they changed the rear hub and made it narrower so the sprocket and rotor (I think) won't align ..... sprocket for sure , BUT , for the front , you will need the R axle and Spacer to make it work , the axle stub on the X is shorter than the R because of the speedo assembly , which will not fit on the R hub (you will lose the use of the cable driven speedo when using the R wheel) , so you need the R Axle to make up the space as well as the spacer for that side , the other side spacer (brake side) "should" be the same on both the R's and the X in order for the caliper and disk to align
I run my 02 450R front wheel on my 06 450X using the 02 axle and spacer , and I also run my 06 450X front wheel on my 02 450R , but I have to use the X axle and spacer/speedo assembly to make it work on the R , the X speedo assembly will not fit the R hub because of the tabs that stick out that make the speedo work ...... I would "just in case" get both side spacers for the R axle , just in case there is a variance , but as far as I know , they should all be the same on the brake side