Using bitcoinj to discover peers and download the block chain
The class WalletAppKit is a good start. Here's a snippet of code that dumps the most recent block, you can probably take it from here. It will take a while to download the block chain and then it will print out the most recent transactions.

public class DumpLastBlock {
public static void main(String args[]) throws Exception {
    WalletAppKit kit = new WalletAppKit(MainNetParams.get(), new java.io.File("."), "test");
    kit.startAndWait();
    BlockChain chain = kit.chain();
    BlockStore bs = chain.getBlockStore();
    Peer peer = kit.peerGroup().getDownloadPeer();
    Block b = peer.getBlock(bs.getChainHead().getHeader().getHash()).get();
    System.out.println(b);
}
}