Considering a continuous random variable Y together with a continuous random vector X, I propose a nonparametric estimator f^(.|x) for the conditional density of Y given X=x. This estimator takes the form of an exponential series whose coefficients Tx = (Tx1,...,TxJ) are the solution of a system of nonlinear equations that depends on an estimator of the conditional expectation E[p(Y)|X=x], where p is a J-dimensional vector of basis functions. The distinguishing feature of the proposed estimator is that E[p(Y)|X=x] is estimated by generalized random forest (Athey, Tibshirani, and Wager, Annals of Statistics, 2019), targeting the heterogeneity of Tx across x. I show that f^(.|x) is uniformly consistent and asymptotically normal, allowing J to grow to infinity. I also provide a standard error formula to construct asymptotically valid confidence intervals. Results from Monte Carlo experiments are provided.