Depends on what brand gear set you buy. You can go anywhere from $30-$130.
It's hard to say "how long" internals will last. Most stock guns should last you a couple seasons providing you don't use a monster battery. There are things that you can do to increase the longevity e.g. re-grease/shim the mechbox, correct the angle of engagement of the sector gear. A re-shim is recommended for G&P gears based on their reputation for the posts breaking off. I have a G&P M4 and I wouldn't say the internals are bad. VFC is another good brand to look into if you're concerned.