This is a bit scrambled.
Both IPv4 and IPv6 have a spot in their headers to tell what type of traffic is being carried. This is a 1-byte integer called a protocol number.
The TCP protocol is protocol number 6. UDP is 17. ICMP is 1. All are carried over IP.
Both IPv4 and IPv6 have another spot in their headers to identify their version. This is where 4 and 6 go, but it's not the same as the protocol number field.
Similarly, Ethernet has a protocol identification field, "EtherType." IPv4 is number 2048 (0x0800); IPv6 is 34525 (0x86DD)