I think, When you set your XBee device to " End Device", at that time, your end device will enter into sleep mode and after some time it will wake up and this cycle repeats.
So when you send the packet, your end device is in sleep mode. So it is not able to receive the packet. Set your second device as a router instead of End device. If you are using xbee library then set it to API router and API= 2