According to the Power of the Titans wiki (disclamer, this page contains heavy spoilers from the manga), the ability to transform into a titan may be hindered if an injury occurred after a recent transformation.
The ability to transform into a Titan can be hindered by injuries inflicted on the human body. A human can transform into a Titan with injuries as severe as a missing limb, but only if a previous transformation has not occurred recently. If a human emerges from their Titan form and receives severe injury, this person cannot transform into a Titan again until said injuries have healed
In the episodes leading up to this event
We see Eren face off with the Armored Titan, but ends up being captured along with Ymir. They soon awaken with their arms severed off to prevent from the escaping.
and in S2, E9
Reiner informs the two that neither of them could transform into Titans in the first place while still recovering from their injuries
When Eren attempted to transform in the final episode, his body was still recovering from this injury inflicted on him.