Terahertz quantum cascade lasers (THz QCLs) are the most powerful solid-state THz sources so far and THz QCLs with various distributed feedback (DFB) gratings have demonstrated single-mode emission, collimated beam, frequency tunability and high output power. Resonant mode characteristics of THz QCLs with DFB, including frequency, loss and electric-field distributions, are important for waveguide analysis, fabrication and indication of THz QCLs' radiative performance. Typically, predictions of these characteristics rely on numerical simulations. However, traditional numerical simulations demand a large amount of running time and computing resources, and have to deal with the trade-off between accuracy and efficiency. In this work, machine learning models are designed to predict resonant mode characteristics of THz QCLs with first-order, second-order, third-order DFB and antenna-feedback waveguides according to the four input structural parameters, i.e. grating period, total length of waveguide, duty cycle of grating and length of highly-doped contact layer. The machine learning models are composed of a multi-layer perceptron for predictions of frequency and loss, and an up-sampling convolutional neural network for predictions of electric-field distribution of the lowest-loss mode, respectively. A detailed study on more than 1000 samples shows high accuracy and efficiency of the proposed models, with Pearson correlation coefficients over 0.99 for predictions of lasing frequency and loss, median peak signal-to-noise ratios over 33.74dB for predictions of electric-field distribution, and the required time of prediction is within several seconds. Moreover, the designed models are widely applicable to various DFB structures for THz QCLs. Resonators with graded photonic heterostructures and novel phase-locked arrays are accurately predicted as examples.