How can I link a component's current to variable resistor value in LTSPice?
Sure. Just type this instead of the value:

R=I(D1)*1000

1000 would be the scaling factor and is often needed because currents are usually in the milli-range while resistors are usually in the kilo-range. You can put more advanced expressions instead of a simple constant factor. Make sure you don't end up with negative resistances and such, it can be difficult to build such a circuit.

To display the resistance as a trace after a transient response simulation you can use Ohm's law: R=U/I. You have to know the name of the voltage nodes on each side of the resistor you want to "measure", then edit the trace name to (V(node1)-V(node2))/I(R1). It will give you a unit of Ohms.