The joke is a play on words.  The phrase said is typically 'I'm too young to die' where 'die' means death, the end of life.  'Dye' which sounds identical was used instead, and means staining colors into cloth.
A cloth maker ' s daughter told him she was too young to dye .