In the first two, the term "port forwarding" really refers to tunneling. Tunneling encapsulates a layer-3 packet inside a new layer-3 packet so that the original can pass as the the encapsulating packet.
The original use for the term "port forwarding" came from NAT. NAT can use a port address on the outside IP address of a NAT router to forward traffic to a host on the inside network. This isn't tunneling since it directly translates the destination address to a different address without encapsulating it inside another packet. There is also layer-2 tunneling where layer-2 frames can be encapsulated in other layer-2 frames.
Both tunneling and NAT port forwarding happen at layer-3, but NAT port forwarding involves layer-4 because it depends on the transport protocol and the port address for that protocol. Tunneling can involve layer-4, too, but that depends on the tunneling implementation and how it is configured.
The OSI layers are theoretical, and real life isn't so neat. Many things blur the lines between layers.