It's not the only option, but the obvious choice is Ormeno's direct connection between Rio / Sao Paulo and Lima. It's a bit of a long ride, at around 4 full days of travel.
Here's the Ormeno website. Here's my experience of doing that trip from Lima to Rio.
I'm not aware of being able to buy a ticket for this connection online. You'd have to go to one of Ormeno's offices. The price in 2017, for a one-way, was around 285 USD.
From Rio, the trip takes you to Sao Paulo and then, all within Brazil, to Acre, in the Far Western corner of the country. The bus then enters Peru in the country's southeastern corner, continuing to Lima via Cusco.
In Lima, you can take another Ormeno bus that directly gets you to Colombia, via Ecuador. Off the top of my head, they connect to both Medellin and Bogota.
(Alternatively, you could travel via Argentina and Chile, or skip Peru and go to Colombia via Manaus, but both are even more of a hassle.)