Well, I don't know if it is the correct forum, but I can tell you that it would be impossible with some guns and extremely difficult with others. Some in-line bolt guns won't open far enough to feed a cartridge, only a cap. Further, the bolts do not have the locking strength to withstand the pressure from a cartridge. (In the muzzle loader, the pressure is kept in by the breech plug, not by the bolt lugs.)
Even those guns built on what is basically a standard rifle action (like the Remington) are different enough in the receiver and bolt that I don't think a change would be feasible and, in any case, would not be reversible. In addition, the cost would be prohibitive and would not be a DIY job.
As to legality, it would be a change in the legal status of the gun (from a muzzle loader to a center fire rifle). I don't know of any law that would prevent the change, but the modified gun could not be used for hunting during muzzle loading seasons.
If you want a cartridge rifle, buy one. If you cannot legally buy a cartridge gun and are trying to convert a muzzle loader to evade the law, don't.
Jim