The refinery, which is more than a century old and has facilities in Wilson and Carson, will shutter by the end of the year.