The batteries included with KIT-145 are 10Ah and should be good for around a 30 minute run time at full speed. Presuming that the wagon will be geared to go walking speed which is around 3 mph then it would need to be on for one hour to go 3 miles. For a one hour run time either 18Ah, or 22Ah batteries would be better suited. Since the wagon will have a heavy load and be driven in sand I would opt for the larger size batteries such as 22Ah.
We do not have any 400 Watt gear motors however we do have 24 Volt 450 Watt gear motors and 36 Volt 600 Watt gear motors which would be a good choice for a beach wagon carrying 400 pounds in the sand. Here is a link to a kit with our 600 Watt gear motor: https://cart.electricscooterparts.com/ProductDetails.asp?ProductCode=KIT-149
This kit KIT-149 linked to above has three 35Ah batteries which gives it a 2 through 3 hour run time at full power. We could make the same kit with 22Ah batteries for a 1 through 1-1/2 hour run time. With 22Ah batteries a smaller battery charger could be used and with the smaller batteries and charger the cost of the kit would be significantly lower.
We can make a custom kit to your exact specifications with any combination of parts that you would like. Please let us know if you have any questions.