An analytical expression is derived for the transition path time distribution for a one-dimensional particle crossing of a parabolic barrier. Two cases are analyzed: (i) A non-Markovian process described by a generalized Langevin equation with a power-law memory kernel and (ii) a Markovian process with a noise violating the fluctuation-dissipation theorem, modeling the stochastic dynamics generated by active forces. In the case (i) we show that the anomalous dynamics strongly affecting the short time behavior of the distributions, but this happens only for very rare events not influencing the overall statistics. At long times the decay is always exponential, in disagreement with a recent study suggesting a stretched exponential decay. In the case (ii) the active forces do not substantially modify the short time behavior of the distribution, but lead to an overall decrease of the average transition path time. These findings offer some novel insights, useful for the analysis of experiments of transition path times in (bio)molecular systems.