Hastings man sentenced for distributing meth