There's no such thing as rehabilitation for TTP members, they grow up in a radicalised environment since young, there is nothing to redeem and it is far too risky to trust it.
Put a bullet through their heads, doesn't matter if there is 40 thousand or 40 million.
Secondly the real solution is not actually militarily, you can keep killing insurgents but they'll be replaced.
You have to combat their ideology of religious extremism to prevent them from being created - which brings me back to the point I keep making of regulating Islamic madrassas and teaching institutions.
Mass education is the only solution, formal education mixed with state regulated Islamic education. They must learn picking up guns against Pakistan , an Islamic Republic, is a big-no. You need to teach them less pan-Islamism and more of a moderate form of Islam based around societal values, morals and lifestyles.
You also need to work more on national identity and nation building efforts. It is a long process but it can be solved.