Finding replacement for transistor, what to look for
First of all, you must be sure that maximum current, voltages, and power dissipation are ok for your particular use, to avoid the magic smoke.

Then, each application might have other requirements, in addition to current, voltage and power ratings.

It's very difficult to cover all the possible cases. I will cite some cases, which are totally not meant to be exhaustive, and should be considered just as examples.

For instance, in a digital application, you might want to have a look at:


The switching characteristics (i.e. the speed).
The on-state resistance (if used with a pull-up resistor).
The threshold voltage and if it is logic level compatible.


In an analog application, you might want to have a look at:


the transconductance.
the threshold voltage.
also the output characteristics.
The capacitances (for bandwidth/stability estimation and or compensation)


In power applications you might need:


The on-state resistance.
The switching characteristics (speed).
The input/output capacitances, and gate charge.
The threshold voltage.
The peak power as a function of duty cycle.


In other applications (e.g. if you use the MOSFET as an analog switch), you might need also to know the OFF-state characteristics.