That tutorial isn't really doing things quite right here.
Have two seperate constructors for your packet like so:
public PacketSendKey() {}
public PacketSendKey(BlockPos blockPos)
{
this.blockPos = blockPos;
}
Then when you go to send this packet, get the mousever position from the client and pass it to the packet constructor yourself.
You can't reference client-sided code in the packet constructor as the packet also needs to be constructed on the server (so it can be passed to your packet handler).