The photo definitely looks like an oil sender and wire. This will not keep the tractor from starting. Most common things that keep a diesel from starting: Clog in fuel line, usually at one of the filters, air in fuel (did you run it out of fuel?), water in fuel, weak battery (engine must crank fast for a diesel to start). Shine a bright light inside your fuel tank and look for debris near the fuel line fitting. Sometimes debris can clog the line.