Correct: those two issues are not related, door water accumulation and trunk lid leak.
Did you have the rear glass replaced? That could be on source of the leak.
The other is if you ever put something oversize into the trunk and tried closing it? Or possibly closing the lid all the time from sides rather than middle of it? That would misalign the lid and break the seal and allow water to come in. You can check this by looking at levelness of the lid to the quarter panel along edges, look for differences left to right side, one side would be sticking up more. There is a levelness gage for this but can be felt by hand:
Gap should be similar L to R, but if it is grossly different that could be an indicator of misalignment...
Another way is for one person to get into the truck and second outside, put a piece of paper along the seal and close the lid, looking for areas where paper is not held by the lid in place.
To correct the sealing, it is done by adjusting/twisting the lid to original state.
If you are not good at this, I would suggest going to a reputable body shop, they should be able to fit it back to spec condition...