I don't know what to say about the lounge access issues, but regarding mileage credit: a simple e-mail to Delta requesting "Original Routing Credit" will do the trick. I am confused why you were rebooked in anything other than B (or perhaps Y), but in any case it should be no problem to get JFK-TXL in "B" posted to your account. Just ask.