I had exactly the same problem, so i started from scratch to examine WHY these blighters were using me for target pratice LOL
This for me works, You need to kick thier butt fairly early on, modify your game strategy to suit, if your going to go for military then get to battle cruisers as quick as you can and kick the crap out of the nearest, biggest, baddest AI, im only on normal level but im always getting threatened, those dam green ET's all the time

i then get the sectors with the most planets in to build one starbase and fit it with production bonuses meanwhile im keeping the AI 'leashed' by using the diplomacy to sell them useless tech

at silly prices which keeps them skint and slows thier expansion. Then when they dont expect it, big shove on military , use waypoints to get your planets with starbases to send ships to your choosen victim

then swap back and use the governor to swap all battle cruiser production with transports, they produce quicker but eat the population so only 1 or 2 from each planet , send these to another waypoint next to your battle cruisers then hit the AI, dont stop till you have run out of ships / transports , then declare peace and go annoy somebody else

Thats just one of the little stratigies i use , you will need a boxfull to play the upper levels , learn how to get to any tech item you want, that helps to, learn to use starbases, learn what the all the ships look like , that way you wont send a fleet of corvettes against an avatar ... (yes ive done it)
Most of all just have fun, hope this has helped a little