Good day. You shoud have list of unspent outputs, for adding them into inputs of your tx. Also you should generate private keys and use special privKey for every input you have.
Try it out:
TransactionOutPoint outPoint = new TransactionOutPoint(params, utxo.getIndex(), utxo.getHash());
byte[] privKeyBytes = HEX.decode(privKeyAsHex);
ECKey ecKey = ECKey.fromPrivate(privKeyBytes);
transaction.addSignedInput(outPoint, utxo.getScript(), ecKey, Transaction.SigHash.ALL, true);









