First off, you are going to have to mic (micrometer) the original inner barrel to figure the outside diameter before you start cutting a new barrel up. You can also use a pair of calipers. If you get lucky, the standard AEG barrel will be the same diameter or slightly smaller than the OD of the original barrel. If it happens to be a larger diameter than the original barrel than either the AEG barrel must be turned down on a lathe, or the Outer barrel of the gun must be reamed out to a larger bore.
After you get it to fit in the outer barrel, check the chambers on both barrels to see if they are similar, and see how the hopup rubber is different fon both barells. Ive done this kind of stuff alot, and sometimes you get lucky, and sometimes you dont. (But fortunatley for me I have the machines to do it) Now, if the hopup rubber is different than the marui rubber, and the hopup slots in the barrels are also diferent than you might have a problem. But before you loose all hope, put the marui hopup on its barrel and see if it will fit into the hopup unit in the gun. If it does happen to fit snuggly, then you got lucky, and check to see if the slots match up where the hopup depression point of the chamber is by turning the hopup up. If they dont line up (rubber dosent protrude from the top of the chamber wn you turn the hopup up) than the slot on the barrel will need to be milled either farther up or farther back depending on the placement of the depression point in the hopup unit.
If all happens to fit correctly than you can usually finish it off by super gluing a small portion of the inner barrel inside of the outer barrel to keep it from sliding forward when in use.
If you have any problems that you feel that you cant remedy, or you have somthing that needs to be machined, then feel free to pm me. I Like to consider myself a "discount machnist" and the airsoft community dosent have many machinists to begin with. So if you have any problem you dont think you can tackle yourself, Id be glad to get it done for you. (at a fraction of the price a regular machinist would run you)