I have had the same issue. I spoke with an agent, and she said that when you make reservations on JetBlue website or app, you must make sure you are LOGGED OUT OF TRUE BLUE. Otherwise, it will auto-populate your B6 number, even if you try to add your AA number. I have had flights incorrectly posted to my B6 account. Too late to do anything about it at this point.
It is clear that the B6 system really wants to credit B6 metal flights to TrueBlue. The only way to avoid it is to call, ask them to manually remove your TrueBlue number and add your AA number, and then DON'T TOUCH the reservation while logged in to TrueBlue on the same device.