Try this:
Create a global boolean titled "Near Ladder" or something similar. The default state of the boolean should be 0 (off).
Create a box collider around the ladder.
Create an FSM on the ladder, with the Trigger Event action. (Your character will need a collider attached to it, that has the "is trigger" box checked). Add to this first FSM state a "set bool value" action. Target the "Near Ladder" boolean and have the action set its value to 0.
Have the Trigger Event action switch the FMS to a new state "On trigger enter". In this new state, add a "Set bool value" action, which targets the "Near Ladder" boolean and sets it to 1.
To this second FSM state, add another "Trigger Event" action, this time "On Trigger exit", the FSM should switch back to the first state.
Lastly, on your character control FSM, whenever the key for "up" is pressed, send the FSM to a new state with a "Bool Test" action - if the Boolean "near Ladder" is true, continue sending the FSM to the state that enables upwards movement. if the boolean isn't true, set an event to send the FSM back to the original state, which will stop the "up" key from working