There are differences but not dimensional w.r.t physical interface and attachment points etc.
One engine can 100% substitute another, but in practice this is rarely done as there are optimisations done on the production + qualification side (w.r.t the inlet, FADEC tuning, trim etc) given their...