you still say nFeeRequired, you must replace this with nTransactionFee:
transaction.setTransactionFee(nTransactionFee);