Hi Abufletcher,
There is no such thing as 'too close' as long as the battery is isolated from vibration. You might not want to keep it totally up front, to prevent more severe crash damage, or at least put a bit of styrofoam around it to absorb impact. That would be in addition to regular sponge rubber foam for vibration protection.
I would also make sure that it's isolated from the firewall as well as the engine, but secured in well enough that it doesn't float around in flight, which would change your CG. And make sure that the intake isn't blocked.
Just my $.02