Not sure what term limits will solve, when every Congressperson just votes party line anyway...
I do not think there is a practical way to solve this but the problem isn't the money-brokers cited below:
They have to in order to keep their jobs. If they break with the party, the power players cut them out of campaign cash and primary them.
The problem isn't the power players cutting their cash, the problem is the other thing that
@847badgerfan mentioned, primaries. Specifically, the problem is extremely low turnout in primaries.
I'll give an example that isn't exact but it isn't all that far off:
Suppose that ~15% of the electorate believes that Abortion should be legal up until the umbilical cord is cut and also encouraged and paid for at government expense. We'll call them pro-choice radicals and they all vote in the Democratic Primaries.
Then suppose that another ~15% of the electorate believes that the morning after pill should be banned and birth control tightly regulated. We'll call them pro-life radicals and they all vote in the Republican Primaries.
So 70% of us have opinions on Abortion that fall between these two extremes. One would think that elected officials would reflect something nearer the middle but it doesn't work that way and the reason is the extremely low turnout in primary elections.
If we had 100% turnout in the primaries then pro-choice radicals would only make up 30% of the Democratic electorate and the pro-life radicals would only make up 30% of the Republican electorate so candidates with more moderate positions could and would win some elections. Instead, turnout in primaries is very low so the 15% of the electorate that are pro-choice radicals more-or-less control Democratic primaries while the 155 of the electorate that are pro-life radicals more-or-less control Republican primaries. Then we get to the general election, the other 70% show up, and their only choices are two radicals.
The only thing I can think of that would materially improve this situation would be to make voting in the primary* a precondition for voting in the general election but that would NEVER gain popular support and even if it did I don't know that it would help much.