Can you spend a target lock and re-roll 0 dice?
Assuming the ship you are attacking is the one you locked on to, yes. It's in the FAQ.
I assume that to be able to spend a target lock you do have to be attacking the ship you have target locked right?
Correct. That's in the basic rules for target locks.
You can't "spend" a target lock to re-roll 0 dice if you are attacking a different ship then you have the TL on. Right?
Correct, you must be attacking the ship you have a target lock on to spend the target lock. Again in the basic rules on target locks if you need reference.