An XDR freehub body is identical to XD other than having and additional 1.8mm on the splines. This means that an XD cassette will fit onto an XDR freehub body when a 1.8mm spacer is fitted behind the cassette.
Please note the opposite is not true: There is no way of fitting an XDR cassette onto an XD freehub body.
XD vs XDR Freehub
As part of the Sram licensing agreement the terms "XD" and "XDR" need to be written on the freehub body - this should make it super easy to tell what freehub you've got.