SOT-23 NMOS transistor power dissipation
What you have calculated is the power dissipated by the solenoid and transistor together. The transistor will maybe  drop 0.1 volts across it when passing 0.2 amps hence its power dissipation is 20 milli watts.

In your case, the 2N7002 is maybe a little closer to the limit. See the graph below: -



What this tells you is that if you drive the gate with 5 volts and you are passing 0.2 amps through the drain, the volt drop from drain to source might be 0.3 volts. Power dissipated is 60 mW.

However, if you are driving the gate with 3V logic signals it is likely to fry because at 0.2A there is no resolution to the 3V curve. In reality the circuit will take about ~50mA with 75% of the voltage being across the transistor so power would be ~675 mW and too much for a puny 2N7002.

As an aside, having read the data sheet, ~0.1A (Fairchild) is the absolute limit for the 2N7002 so, you should not consider using this device for driving a 0.2A solenoid. On the other hand, for NXP, the limit is 300mA (SOT23 package) so you need to check what the source is for the device. It can be annoying when different suppliers do this. Supertex state 115mA (same as FC) and I won't go into any others but, hopefully you see the issue.

You'll also need a flyback catch diode across the solenoid because, when you turn the FET off, the current thru the solenoid has created a magnetic field and hence has stored energy - this energy turns into a big voltage spike that will easily damage transistors when they try to deactivate the solenoid.