The M&P 15/22 although looks like an AR15 is different when it comes to attaching the forward hand guard. You would have to remove the barrel nut and replace it with an adaptor that can now attach a standard CAR hand guard, it would and will be a floating hand guard from now on (stock is also a floater). Then you can attach any type handguard that fits an AR15 from this point on. See this forum for more information:
Just one minor correction. You don't replace the factory barrel nut, you use it in conjunction with the barrel nut adapter and then use a standard AR15 barrel nut and/or Delta Ring assembly if needed.
The 15-22P barrel is too short to accommodate a conventional AR hand guard. Sorry but unless you have a magic pixie wand there is just no physical way to get that set up onto the pistol version.