We will now unknot the wire without changing the topology of the magnetic field line along the center of the solenoid. For this note that we only have to change one 'bridge' in the sketch above to a 'tunnel'.
Imagine a blow-up of one bridge. We pull apart a little bit the two crossing parts of the solenoid to illustrate the bridge formed by the thin wire:
We may then unknot the wire while not moving other parts of the solenoid:
Finally we push together the solenoid again keeping the changed topology of the wire. Thus the centerline of the solenoid is unchanged in the form of a trefoil knot, while the wire itself is of zero-knot topology.