aren't llm's used right now to rewrite all the cobol?
COBOL (or PL/1) to any other language is a deterministic problem, imagine transpiling millions of line of code and every time you run the compiler you get slightly different output...
Anyway transpiling from one language to another ie COBOL to java is almost the easy bit, the hard bit is making the behavior and execution correct, especially when there are multiple OS and product services that don't exist outside the mainframe.
disclosure I am CTO of heirloom computing, we migrate mainframe applications to the cloud.