If you have confirmed through the online case status check that your I-130 remains pending and the letter you received states that the denial of your I-485 resulted from the dismissal of your I-130, it follows that (1) the reason given for the denial of the I-485 is in error, and it was denied for a different reason; (2) your I-130 has been denied and the computer system does not properly reflect the denial; or (3) your I-485 was denied in error because, for some reason, the person reviewing it mistakenly believed your I-130 had been denied.

We cannot investigate any of that for you, so you either need to get in touch with the USCIS to see what you can learn - being very careful not to miss any deadlines for challenging or appealing their determinations - or retain a lawyer to assist you with that process.