No difference outright, but there is a small difference in most of the locomotives. In WDP4B and WDG4 locomotives, the diesel tank under the locomotive is towards the long hood of the locomotive. For WDP4 locos, the diesel tank is placed on the short hood side. This is clearly visible from the the outside.
There are few exceptions too to this. WDP4B Prateek has it's diesel tank placed in a similar location to WDP4 locos. So, this difference may not be present all the time, but is present in many cases.