Best bike routes in Brooklyn
There are essentially no rides that are 'unimpeded by pedestrian or car traffic' around Brooklyn, because Brooklyn is on a densely-populated island adjacent to another even more densely populated island so there's no nearby countryside, and we still use our rail lines very heavily so there are no rail trails.

The 30-miler I've found with the most 'open road' feeling is heading to Breezy Point on side streets through Flatbush— take something like E. 35th Street down to Marine Park, then take the bike trail along Flatbush Ave. to the Marine Parkway bridge and Rockaway Point Boulevard. There are very few lights between the Flatbush Ave. bike trail and the tip of Breezy Point, so about half of the ride is unimpeded.

I usually loop back via the Belt Parkway bike trail and take Bedford Avenue back north.

Basically, something like this:
https://www.google.com/maps/dir/Prospect+Park,+Brooklyn,+NY/Beach+227th+St,+Breezy+Point,+NY+11697/@40.6275278,-73.9439275,13z/data=!4m34!4m33!1m25!1m1!1s0x89c25b1087680443:0x178bf7c600df7a98!2m2!1d-73.968956!2d40.660204!3m4!1m2!1d-73.9620066!2d40.6631979!3s0x89c25b0d7ded003b:0xc1bbc03310eefdd0!3m4!1m2!1d-73.9476347!2d40.6597135!3s0x89c25b655fbe3f19:0x2445bed892551a5c!3m4!1m2!1d-73.9438733!2d40.6425748!3s0x89c25b5a445c57a3:0xa1b0241726698868!3m4!1m2!1d-73.9313515!2d40.6063921!3s0x89c2436130911e41:0x34bf5c3bfeec3860!1m5!1m1!1s0x89c243fe55767105:0x64ffd3f4302f0ba6!2m2!1d-73.9328573!2d40.5524677!3e1

But if you want easy access to 'real' road riding from the city, you'll probably want to live in Northern Manhattan or the Bronx.