In high energy nuclear collisions, heavy flavor tagged jets are useful hard probes to study the properties of the quark-gluon plasma (QGP). In this talk, we present the first theoretical prediction of the $D^0$ meson radial distributions in jets relative to the jet axis both in p+p and Pb+Pb collisions at $5.02$ TeV, it shows a nice agreement with the available experimental data. The in-medium jet evolution in the study is described by a Monte Carlo transport model which has been incorporated with the initial events as input provided by the next-to-leading order (NLO) plus parton shower (PS) event generator SHERPA. In such evolution process, both elastic and inelastic parton energy loss in the hot and dense medium are taken into account. Within this same simulation framework, we predict different modification patterns of the radial profile of charm and bottom quarks in jets in Pb+Pb collisions: jet quenching effect will lead the charm quarks diffuse to lager radius while lead the bottom quarks distributed closer to jet axis.