Would I get more goblin attacks, if I built my fortress near a goblin fortress? How close do I have to build my fortress to a goblin fotress, if it indeed helps?
I would say, from purely anecdotal evidence (~10 forts) that it absolutely does make a significant difference. My forts that are miles away from any civ are rarely attacked, the one in between two goblin towers on the edge of a goblin-controlled mountain range is basically swarming with the little jerks. I haven't got many sieges in my forts, not enough to make any sort of guess whether they might be affected, but the ambushes are almost certainly affected from what I can see. In the latter fort, I've had 3 ambushes lead by goblins with "legendary" names, one of whom was a Local leader/Goblin Mace Lord. Fortunately my sole on-duty marksdwarf got a lucky shot in and nailed him right through both lungs.
But I digress. Yes, I believe your proximity to Goblin civilization does affect both the strength and numbers of the goblin attacks as well as how often. With ambushes at least, and probably sieges too. As for how far away, my Goblin-swarmed fort was about 6 tiles away from the goblin towers on the Region map during Embark... But I think you can be further away than that and still get plenty of goblins.
Note that you can check on the Embark screen if your fort is accessible to goblins by pressing "tab" once or twice. It will list all nearby civs.