If you are using the smart contact wrapper then you usually need to give one of the available transaction managers as a parameter and then give the chain Id when you initialize it
Web3j web3 = Web3j.build(new HttpService("https://bsc-dataseed.binance.org/"));
long chainId = 56;
FastRawTransactionManager txMananger = new FastRawTransactionManager(web3, <your-credentials-instance>, chainId);
MyContract contract = new MyContract(<address of contract>, web3, txManager, new DefaultGasProvider());
contract.transfer(........);
if you are not using the web3j wrapper and build your transaction manually then:
Web3j web3 = Web3j.build(new HttpService("https://bsc-dataseed.binance.org/"));
long chainId = 56;
RawTransaction rawTransaction = RawTransaction.createTransaction(<address-nonce>, <gas price as big integer>, <gas limit as big integer>, <contract address>, <endcoded function of contract>);
byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, chainId , <you Credentials>);
String hexValue = Numeric.toHexString(signedMessage);
EthSendTransaction transactionResponse = web3 .ethSendRawTransaction(hexValue).sendAsync().get();