The wiring diagram is confusing, but the switch is pretty simple. The original switch has 5 terminals:
1. Batt - this goes directly to the battery (it does not pass go)
2. Ign - this powers the ignition circuitry, which allows the engine to run (it gets connected to Batt in both start and run)
3. Sol - this goes to the solenoid to start the engine (it gets connected to Batt when in start position only)
4. Reg - this comes from the voltage regulator to charge the battery (it gets connected to Batt when in run position only)
5. Acc - this goes to the lights (it gets connected to Batt in both start and run)
The schematic says these are the colors for the wires:
1. Batt - Red
2. Ign - Pink (goes to seat safety switch) and Yellow (goes to PTO switch)
3. Sol - Purple
4. Reg - Light Green
5. Acc - Yellow (goes to light switch)
You have two yellow wires so you need to figure out which is which, i.e. where does each one go.
I don't have a 316, but this is why I try and remember to take lots of pictures of things before I take them apart
From the schematic, it is clear that there are at least two different possiblities. So, you would need to find a picture of one that matches yours. But, do you even know that yours is stock, and was not modified by a PO?.
Electrical issues can be tricky to figure out, but are usually solvable. What is the SN range of your tractor? Does it match the range listed in the schematic? My guess is that yours has the six wires shown in the schematic as separate wires. But, that is a guess. It should reasonably easy to check continuity of each of the wires to figure where they are going. It could also be there is break/bad connection in one or more of the wires. Doing the continuity check would be the next step in troubleshooting that issue too. I don't have a 316, but I have solved many electrical problem and replaced an ignition switch. Normally, it is easy. You might have the wrong switch, a bad switch, the wires in the wrong place, or a broken wire/bad connection.
What made you think you needed to replace the ignition switch?
What does, it doesn't work mean?
It could mean, the starter does not run, but the lights come on. Or it could mean the starter cranks the engine, but it doesn't run. Or other more unlikely things.
Are you sure your battery is working?
Are the safeties working?
Do you have a Volt Ohm Meter (also called a DVM these days)?