The target is always the current target of your ship.
You can however order another ship to tow this target.

Every object you can target from your ship can be towed.
Catch an UFO, create a zoo of space flies...
Don't like the position of the Goner Temple? Change it...

A Jumpdrive can be used when towing ships or asteroids. Yes, the cargo will jump with your ship.

Every sector costs Energy Cells, even if you used a jump gate. (not recommended with a 4km asteroid in tow)
If your tow ship does not have enough EC a log book message will tell you how much it would have needed.

The smaller your tug is compared to the cargo, the higher the cost in EC.

Any ship with laser or turret capability and a tractor beam on board qualifies.
I never saw the reasoning behind only letting military ships tow stuff.
Your car breaks down. Do you call a tow truck or a battle tank?

Firing any laser disengages the Tractor Beam.

Executing the menu command again disengages the Tractor Beam.

If the tow ship is in the same sector as the towee it will fly to this target and leash it. That is all the navigation this script will do.

After the cargo is on the hook you may issue any nav command you want.

The alignment of the cargo is exactly the same as the tow ship. You can move and rotate a station as accurately as you can move or rotate a ship.

The freight is towed with 1km distance to the ship.

The tow ship is completely safe from the cargo. The rest of the sector is not.

Ok, if i give it to my osprey and tell him to tow a mine, it says malfunction...no matter what, if i get him close, or far, whatever. With me I install it, or run it in commands, sometimes it says malfunction, but usually not...then I try to connect to something, no problem, but I thought you said you could jump with this new TB? When i try to jump (either the standard way or with jump to position) I end up in the new sector and it says malfunction and the mine stays where it was.

In fact, I think I will enable jumping with towed asteroids with this script.

Asteroids are extremely simple objects and a mock jump is very easy to do.
Most likely this kinda overload is going to fry the jumpdrive but it would be a way to use the asteroids from Khaak and Xenon sectors without having to constantly clear them...