Answer: Irony
Explanation:
This is an example of irony as literary device. As this kind of device, irony acts like contrast between situation that can happen and reality that is actually happening instead.
In this case, John doesn't want to listen father's teaching and instead of listening his father as the better option, he finds himself trapped in his own thoughts. His own thinking is represented as ''rigid'' which means that it was better to him to listen his father than himself.