How to train a model that similar to another model

Hi, I have a question about training a model that similar to another model.
For example, I have a classification model A. which output is

outputA = modelA (input), the dimension is [batchsize, nclass]

I also have another classification model B, the output dimension is the same as model A.
How can I train the model B that make its output similar to modelA?

I have tried the L1Loss to calculate the loss of two outputs and make it similar. But it does not works.
Any ideas about this area? Thank you so much. Appreciate it.