- 9V PP3-size battery simply won't be powerful enough, give up on that idea. 4xAA cells perhaps? Best to power the solenoid separately from the Arduino anyhow.
- Can't work out what current that solenoid takes, but it will be in 0.2 to 1A range I suspect from the datasheet for the series - you need a power source that can provide this.
- circuit and code look basically OK on a quick inspection, MOSFET definitely up for driving that and larger solenoids nicely. Add a 150 ohm resistor between gate and pin6, you don't want to over-current the pin repeatedly, could burn it out.