I have seen people ask this question before, but I think they are all UNO. Does anyone know if this is the same command for a Mega>? Or what I am doing wrong?
PORTD is 8 bits wide. Why on earth are you trying to read bit 48??
If you are trying to do direct port reads, you need to know the correct port and bit. Arduino pin numbers have absolutely no relationship to the PORTx registers of the AVR. The digitalRead() function uses a lookup table to find the correct port and bit for your, that's why it takes so long.
Here is the pin map for the Arudino mega. Find pins 48 and 22 and use their correct bit and PORT.