we have a tank at home which seems to last forever ( relative to the 2 weeks every one seems to be talking about here). I think if you buy the traditional goldfish with the swishy tail those are more delicate and die easily. We just went and bought a type of guppy-like fish which has florescent blue and red colours, they are sold in a bunch of ten/twenty and when put together in a 13" tank, it makes for an impressiev display.
What makes for longevity in the tank is the proper equipment ( filter, air pump,drops for warding off algae etc) and proper maintennance. Do pay attention to the fish food you givem try and avoid the ones from China , cheap as they may be. Those tend to cause pollution of the tank water. In general , those from taiwan are better quality.
Good luck and I hope you enjoy them for a long time !