Just get in there an mess with that linkage until it looks like it is supposed to, you'll find plenty of good pictures on the internet that show what it's supposed to look like. You appear to have the stock setup so it should go back together just fine.
This should help, the pictures are pretty good, just ignore the little drop bracket.
https://wranglertjforum.com/threads/transfer-case-linkage-problems.10890/
Edit: obviously ignore the fact that the thread I linked to is titled "Transfer Case Linkage Problems"