That's not a choke lever, diesels don't have chokes.
That's a fuel cut off lever, it shuts off fuel to the engine, same thing as shutting it off with the key would do if you fuel solenoid was working properly.
Do yourself and your tractor a favor and get the WSM (work shop manual, AKA Service manual) And the OPS manual (operators manual) for the tractor and it will give you the troubleshooting path to fix the key issue.